]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/anonymous-region-in-apit.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.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() {}