]> git.proxmox.com Git - rustc.git/blob - src/test/ui/nll/user-annotations/constant-in-expr-trait-item-1.stderr
New upstream version 1.61.0+dfsg1
[rustc.git] / src / test / ui / nll / user-annotations / constant-in-expr-trait-item-1.stderr
1 error[E0312]: lifetime of reference outlives lifetime of borrowed content...
2 --> $DIR/constant-in-expr-trait-item-1.rs:10:5
3 |
4 LL | <() as Foo<'a>>::C
5 | ^^^^^^^^^^^^^^^^^^
6 |
7 = note: ...the reference is valid for the static lifetime...
8 note: ...but the borrowed content is only valid for the lifetime `'a` as defined here
9 --> $DIR/constant-in-expr-trait-item-1.rs:9:8
10 |
11 LL | fn foo<'a>(_: &'a u32) -> &'static u32 {
12 | ^^
13
14 error: aborting due to previous error
15
16 For more information about this error, try `rustc --explain E0312`.