]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-49824.rs
Auto merge of #55519 - fhartwig:hashmap-index-example, r=Centril
[rust.git] / src / test / ui / issues / issue-49824.rs
1 #![feature(rustc_attrs)]
2
3 // This test checks that a failure occurs with NLL but does not fail with the
4 // legacy AST output. Check issue-49824.nll.stderr for expected compilation error
5 // output under NLL and #49824 for more information.
6
7 #[rustc_error]
8 fn main() {
9     //~^ compilation successful
10     let mut x = 0;
11     || {
12         || {
13             let _y = &mut x;
14         }
15     };
16 }