diff options
Diffstat (limited to 'src/test/ui/type-alias-impl-trait/bounds-are-checked.stderr')
-rw-r--r-- | src/test/ui/type-alias-impl-trait/bounds-are-checked.stderr | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/ui/type-alias-impl-trait/bounds-are-checked.stderr b/src/test/ui/type-alias-impl-trait/bounds-are-checked.stderr new file mode 100644 index 000000000..920eef11d --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/bounds-are-checked.stderr @@ -0,0 +1,19 @@ +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 + | +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 +... +LL | t + | ^ + +error: aborting due to previous error; 1 warning emitted + |