fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0521]: borrowed data escapes outside of closure 2 --> $DIR/anonymous-region-in-apit.rs:8:17 3 | 4LL | fn qux(foo: impl Foo<&str>) { 5 | --- lifetime `'2` appears in the type of `foo` 6LL | |baz: &str| foo.bar(baz); 7 | --- - ^^^^^^^^^^^^ 8 | | | | 9 | | | `baz` escapes the closure body here 10 | | | argument requires that `'1` must outlive `'2` 11 | | let's call the lifetime of this reference `'1` 12 | `baz` is a reference that is only valid in the closure body 13 14error: aborting due to previous error 15 16For more information about this error, try `rustc --explain E0521`.