]> git.lizzy.rs Git - rust.git/blob - src/test/ui/let-else/let-else-binding-immutable.rs
Auto merge of #102530 - cuviper:upgrade-i586-gnu, r=pietroalbini
[rust.git] / src / test / ui / let-else / let-else-binding-immutable.rs
1 // from rfc2005 test suite
2
3
4
5 pub fn main() {
6     let Some(x) = &Some(3) else {
7         panic!();
8     };
9     *x += 1; //~ ERROR: cannot assign to `*x`, which is behind a `&` reference
10 }