]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/type-alias-impl-trait/bounds-are-checked.full_tait.stderr
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / src / test / ui / type-alias-impl-trait / bounds-are-checked.full_tait.stderr
diff --git a/src/test/ui/type-alias-impl-trait/bounds-are-checked.full_tait.stderr b/src/test/ui/type-alias-impl-trait/bounds-are-checked.full_tait.stderr
new file mode 100644 (file)
index 0000000..ca89421
--- /dev/null
@@ -0,0 +1,35 @@
+warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/bounds-are-checked.rs:6:32
+   |
+LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
+   |                                ^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
+   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
+
+warning: unnecessary lifetime parameter `'a`
+  --> $DIR/bounds-are-checked.rs:12:6
+   |
+LL | fn f<'a: 'static>(t: &'a str) -> X<'a> {
+   |      ^^^^^^^^^^^
+   |
+   = help: you can use the `'static` lifetime directly, in place of `'a`
+
+error[E0308]: mismatched types
+  --> $DIR/bounds-are-checked.rs:9:14
+   |
+LL | type X<'a> = impl Into<&'static str> + From<&'a str>;
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
+   |
+   = note: expected trait `From<&'a str>`
+              found trait `From<&'static str>`
+note: the lifetime `'a` as defined on the item at 9:8...
+  --> $DIR/bounds-are-checked.rs:9:8
+   |
+LL | type X<'a> = impl Into<&'static str> + From<&'a str>;
+   |        ^^
+   = note: ...does not necessarily outlive the static lifetime
+
+error: aborting due to previous error; 2 warnings emitted
+
+For more information about this error, try `rustc --explain E0308`.