]> git.proxmox.com Git - rustc.git/blob - src/test/ui/type-alias-impl-trait/bounds-are-checked.full_tait.stderr
New upstream version 1.55.0+dfsg1
[rustc.git] / src / test / ui / type-alias-impl-trait / bounds-are-checked.full_tait.stderr
1 warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
2 --> $DIR/bounds-are-checked.rs:6:32
3 |
4 LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
5 | ^^^^^^^^^^^^^^^^^^^^^
6 |
7 = note: `#[warn(incomplete_features)]` on by default
8 = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
9
10 warning: unnecessary lifetime parameter `'a`
11 --> $DIR/bounds-are-checked.rs:12:6
12 |
13 LL | fn f<'a: 'static>(t: &'a str) -> X<'a> {
14 | ^^^^^^^^^^^
15 |
16 = help: you can use the `'static` lifetime directly, in place of `'a`
17
18 error[E0308]: mismatched types
19 --> $DIR/bounds-are-checked.rs:9:14
20 |
21 LL | type X<'a> = impl Into<&'static str> + From<&'a str>;
22 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
23 |
24 = note: expected trait `From<&'a str>`
25 found trait `From<&'static str>`
26 note: the lifetime `'a` as defined on the item at 9:8...
27 --> $DIR/bounds-are-checked.rs:9:8
28 |
29 LL | type X<'a> = impl Into<&'static str> + From<&'a str>;
30 | ^^
31 = note: ...does not necessarily outlive the static lifetime
32
33 error: aborting due to previous error; 2 warnings emitted
34
35 For more information about this error, try `rustc --explain E0308`.