]> git.lizzy.rs Git - rust.git/blob - src/test/ui/closures/closure-bounds-static-cant-capture-borrowed.rs
Auto merge of #84267 - dtolnay:ptrunit, r=nagisa
[rust.git] / src / test / ui / closures / closure-bounds-static-cant-capture-borrowed.rs
1 fn bar<F>(blk: F) where F: FnOnce() + 'static {
2 }
3
4 fn foo(x: &()) {
5     bar(|| {
6         //~^ ERROR explicit lifetime required in the type of `x` [E0621]
7         let _ = x;
8     })
9 }
10
11 fn main() {
12 }