diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2014-12-05 15:56:25 -0800 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2015-01-05 16:14:17 +1100 |
| commit | bf6c007760169e9c382d3700fd1cdd20037e4343 (patch) | |
| tree | 248a48e3811afdf8908c5ebf260d67eade27aa92 /src/rustllvm/ExecutionEngineWrapper.cpp | |
| parent | 5773bdefff2e47cc007f5cc2af3f80b30303d45a (diff) | |
| download | rust-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
