rust/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-2.stderr

11 lines
352 B
Plaintext
Raw Normal View History

2018-12-11 15:49:40 -06:00
error: lifetime may not live long enough
--> $DIR/constant-in-expr-trait-item-2.rs:12:5
|
LL | fn foo<'a, T: Foo<'a>>() -> &'static u32 {
| -- lifetime `'a` defined here
LL | <T as Foo<'a>>::C //~ ERROR
| ^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static`
error: aborting due to previous error