mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
13 lines
223 B
Rust
13 lines
223 B
Rust
#![feature(anonymous_lifetime_in_impl_trait)]
|
|
|
|
trait Foo<T> {
|
|
fn bar(self, baz: T);
|
|
}
|
|
|
|
fn qux(foo: impl Foo<&str>) {
|
|
|baz: &str| foo.bar(baz);
|
|
//~^ ERROR borrowed data escapes outside of closure
|
|
}
|
|
|
|
fn main() {}
|