]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-49824.rs
Rollup merge of #60520 - matklad:rustfmt-all-the-new-things, r=Centril
[rust.git] / src / test / ui / issues / issue-49824.rs
1 #![feature(rustc_attrs)]
2
3 // This test checks that a warning occurs with migrate mode.
4
5 #[rustc_error]
6 fn main() {
7     //~^ ERROR compilation successful
8     let mut x = 0;
9     || {
10         || {
11         //~^ WARNING captured variable cannot escape `FnMut` closure body
12         //~| WARNING this error has been downgraded to a warning
13         //~| WARNING this warning will become a hard error in the future
14             let _y = &mut x;
15         }
16     };
17 }