]> git.lizzy.rs Git - rust.git/blob - tests/ui/issues/issue-40510-1.rs
Rollup merge of #106397 - compiler-errors:new-solver-impl-wc, r=lcnr
[rust.git] / tests / ui / issues / issue-40510-1.rs
1 #![allow(unused)]
2
3 fn f() {
4     let mut x: Box<()> = Box::new(());
5
6     || {
7         &mut x
8     };
9     //~^^ ERROR captured variable cannot escape `FnMut` closure body
10 }
11
12 fn main() {}