]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-40510-1.rs
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-40510-1.rs
CommitLineData
3b2f2976 1#![allow(unused)]
041b39d2 2
3b2f2976
XL
3fn f() {
4 let mut x: Box<()> = Box::new(());
5
6 || {
7 &mut x
8 };
e74abb32 9 //~^^ ERROR captured variable cannot escape `FnMut` closure body
223e47cc 10}
3b2f2976 11
a1dfa0c6 12fn main() {}