]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/bounds-are-checked.min_tait.stderr
Auto merge of #82980 - tmiasko:import-cold-multiplier, r=michaelwoerister
[rust.git] / src / test / ui / type-alias-impl-trait / bounds-are-checked.min_tait.stderr
1 warning: unnecessary lifetime parameter `'a`
2   --> $DIR/bounds-are-checked.rs:12:6
3    |
4 LL | fn f<'a: 'static>(t: &'a str) -> X<'a> {
5    |      ^^^^^^^^^^^
6    |
7    = help: you can use the `'static` lifetime directly, in place of `'a`
8
9 error[E0308]: mismatched types
10   --> $DIR/bounds-are-checked.rs:9:14
11    |
12 LL | type X<'a> = impl Into<&'static str> + From<&'a str>;
13    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
14    |
15    = note: expected trait `From<&'a str>`
16               found trait `From<&'static str>`
17 note: the lifetime `'a` as defined on the item at 9:8...
18   --> $DIR/bounds-are-checked.rs:9:8
19    |
20 LL | type X<'a> = impl Into<&'static str> + From<&'a str>;
21    |        ^^
22    = note: ...does not necessarily outlive the static lifetime
23
24 error: aborting due to previous error; 1 warning emitted
25
26 For more information about this error, try `rustc --explain E0308`.