blob: 4ee32847c5ec8555771612d5f29545ef8b7bfa78 [file] [log] [blame]
error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
--> $DIR/constant-in-expr-trait-item-3.rs:10:5
|
LL | T::C
| ^^^^
|
note: first, the lifetime cannot outlive the lifetime `'a` as defined on the function body at 9:8...
--> $DIR/constant-in-expr-trait-item-3.rs:9:8
|
LL | fn foo<'a, T: Foo<'a>>() -> &'static u32 {
| ^^
note: ...so that the types are compatible
--> $DIR/constant-in-expr-trait-item-3.rs:10:5
|
LL | T::C
| ^^^^
= note: expected `Foo<'_>`
found `Foo<'a>`
= note: but, the lifetime must be valid for the static lifetime...
note: ...so that reference does not outlive borrowed content
--> $DIR/constant-in-expr-trait-item-3.rs:10:5
|
LL | T::C
| ^^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0495`.