]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/borrowck/borrowck-in-static.rs
1 // check that borrowck looks inside consts/statics
3 static FN
: &'
static (dyn Fn() -> (Box
<dyn Fn()->Box
<i32>>) + Sync
) = &|| {
5 Box
::new(|| x
) //~ ERROR cannot move out of `x`, a captured variable in an `Fn` closure