about summary refs log tree commit diff
path: root/src/test/compile-fail/mut-pattern-internal-mutability.rs
AgeCommit message (Collapse)AuthorLines
2018-08-14Moved compile-fail tests to ui tests.David Wood-30/+0
2018-04-15remove -Znll -- borrowck=mir implies nll nowNiko Matsakis-1/+2
2017-11-26Update tests for -Zborrowck-mir -> -Zborrowck=mode migrationest31-5/+3
2017-11-19mir-borrowck: Remove parens in the lvalue description of a derefBasile Desloges-1/+1
2017-10-25Reword to avoid using either re-assignment or reassignment in errorsCarol (Nichols || Goulding)-3/+3
2017-09-26mir-borrowck: Edit compile-fail tests with E0506 error to also test on MIR ↵Basile Desloges-2/+9
borrowck
2015-01-31Kill more `isize`sTobias Bucher-1/+1
2015-01-08Update compile-fail tests to use is/us, not i/u.Huon Wilson-1/+1
2015-01-05Change `&` pat to only work with &T, and `&mut` with &mut T.Huon Wilson-0/+24
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.