]> git.proxmox.com Git - rustc.git/blob - tests/ui/borrowck/anonymous-region-in-apit.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / borrowck / anonymous-region-in-apit.rs
1 #![feature(anonymous_lifetime_in_impl_trait)]
2
3 trait Foo<T> {
4 fn bar(self, baz: T);
5 }
6
7 fn qux(foo: impl Foo<&str>) {
8 |baz: &str| foo.bar(baz);
9 //~^ ERROR borrowed data escapes outside of closure
10 }
11
12 fn main() {}