rust/tests/ui/closures/binder/suggestion-for-introducing-lifetime-into-binder.rs

8 lines
221 B
Rust
Raw Normal View History

#![feature(closure_lifetime_binder)]
fn main() {
for<> |_: &'a ()| -> () {};
//~^ ERROR use of undeclared lifetime name `'a`
for<'a> |_: &'b ()| -> () {};
//~^ ERROR use of undeclared lifetime name `'b`
}