]> git.proxmox.com Git - rustc.git/blob - src/test/ui/borrowck/anonymous-region-in-apit.stderr
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / borrowck / anonymous-region-in-apit.stderr
1 error[E0521]: borrowed data escapes outside of closure
2 --> $DIR/anonymous-region-in-apit.rs:8:17
3 |
4 LL | fn qux(foo: impl Foo<&str>) {
5 | --- lifetime `'2` appears in the type of `foo`
6 LL | |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
14 error: aborting due to previous error
15
16 For more information about this error, try `rustc --explain E0521`.