]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/type-alias-impl-trait/bounds-are-checked.stderr
Update unsuspicious file list
[rustc.git] / src / test / ui / type-alias-impl-trait / bounds-are-checked.stderr
index d5fafe05887b9e1175e473810bd85f587d3a9b8d..920eef11da4b993dcdf66fb168602371b8145781 100644 (file)
@@ -1,26 +1,19 @@
 warning: unnecessary lifetime parameter `'a`
-  --> $DIR/bounds-are-checked.rs:9:6
+  --> $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[E0308]: mismatched types
-  --> $DIR/bounds-are-checked.rs:6:14
+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>;
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
-   |
-   = note: expected trait `From<&'a str>`
-              found trait `From<&'static str>`
-note: the lifetime `'a` as defined on the item at 6:8...
-  --> $DIR/bounds-are-checked.rs:6:8
-   |
-LL | type X<'a> = impl Into<&'static str> + From<&'a str>;
-   |        ^^
-   = note: ...does not necessarily outlive the static lifetime
+   |        -- 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
 
-For more information about this error, try `rustc --explain E0308`.