diff options
Diffstat (limited to 'tests/ui/type-alias-impl-trait/bounds-are-checked.stderr')
-rw-r--r-- | tests/ui/type-alias-impl-trait/bounds-are-checked.stderr | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/tests/ui/type-alias-impl-trait/bounds-are-checked.stderr b/tests/ui/type-alias-impl-trait/bounds-are-checked.stderr index 920eef11d..962dedde0 100644 --- a/tests/ui/type-alias-impl-trait/bounds-are-checked.stderr +++ b/tests/ui/type-alias-impl-trait/bounds-are-checked.stderr @@ -1,13 +1,5 @@ -warning: unnecessary lifetime parameter `'a` - --> $DIR/bounds-are-checked.rs:8:6 - | -LL | fn f<'a: 'static>(t: &'a str) -> X<'a> { - | ^^ - | - = help: you can use the `'static` lifetime directly, in place of `'a` - -error: non-defining opaque type use in defining scope - --> $DIR/bounds-are-checked.rs:10:5 +error[E0792]: expected generic lifetime parameter, found `'static` + --> $DIR/bounds-are-checked.rs:9:5 | LL | type X<'a> = impl Into<&'static str> + From<&'a str>; | -- cannot use static lifetime; use a bound lifetime instead or remove the lifetime parameter from the opaque type @@ -15,5 +7,6 @@ LL | type X<'a> = impl Into<&'static str> + From<&'a str>; LL | t | ^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error +For more information about this error, try `rustc --explain E0792`. |