about summary refs log tree commit diff
path: root/src/rustllvm/ExecutionEngineWrapper.cpp
diff options
context:
space:
mode:
authorHuon Wilson <dbau.pp+github@gmail.com>2014-12-05 15:56:25 -0800
committerHuon Wilson <dbau.pp+github@gmail.com>2015-01-05 16:14:17 +1100
commitbf6c007760169e9c382d3700fd1cdd20037e4343 (patch)
tree248a48e3811afdf8908c5ebf260d67eade27aa92 /src/rustllvm/ExecutionEngineWrapper.cpp
parent5773bdefff2e47cc007f5cc2af3f80b30303d45a (diff)
downloadrust-bf6c007760169e9c382d3700fd1cdd20037e4343.tar.gz
rust-bf6c007760169e9c382d3700fd1cdd20037e4343.zip
Change `&` pat to only work with &T, and `&mut` with &mut T.
This implements RFC 179 by making the pattern `&<pat>` require matching
against a variable of type `&T`, and introducing the pattern `&mut
<pat>` which only works with variables of type `&mut T`.

The pattern `&mut x` currently parses as `&(mut x)` i.e. a pattern match
through a `&T` or a `&mut T` that binds the variable `x` to have type
`T` and to be mutable. This should be rewritten as follows, for example,

    for &mut x in slice.iter() {

becomes

    for &x in slice.iter() {
        let mut x = x;

Due to this, this is a

[breaking-change]

Closes #20496.
Diffstat (limited to 'src/rustllvm/ExecutionEngineWrapper.cpp')
0 files changed, 0 insertions, 0 deletions