]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/generic-associated-types/projection-type-lifetime-mismatch.stderr
Don't suggest adding `'static` lifetime to arguments
[rust.git] / src / test / ui / generic-associated-types / projection-type-lifetime-mismatch.stderr
index 13b765dfa57191e8d1aa59ea89233afa283c56b8..aec878625661bef9bb668b8d7f0300515432dc84 100644 (file)
@@ -1,24 +1,18 @@
 error[E0621]: explicit lifetime required in the type of `x`
   --> $DIR/projection-type-lifetime-mismatch.rs:18:5
    |
-LL | fn f(x: &impl for<'a> X<Y<'a> = &'a ()>) -> &'static () {
-   |         ------------------------------- help: add explicit lifetime `'static` to the type of `x`: `&'static impl for<'a> X<Y<'a> = &'a ()>`
 LL |     x.m()
    |     ^^^^^ lifetime `'static` required
 
 error[E0621]: explicit lifetime required in the type of `x`
   --> $DIR/projection-type-lifetime-mismatch.rs:23:5
    |
-LL | fn g<T: for<'a> X<Y<'a> = &'a ()>>(x: &T) -> &'static () {
-   |                                       -- help: add explicit lifetime `'static` to the type of `x`: `&'static T`
 LL |     x.m()
    |     ^^^^^ lifetime `'static` required
 
 error[E0621]: explicit lifetime required in the type of `x`
   --> $DIR/projection-type-lifetime-mismatch.rs:28:5
    |
-LL | fn h(x: &()) -> &'static () {
-   |         --- help: add explicit lifetime `'static` to the type of `x`: `&'static ()`
 LL |     x.m()
    |     ^^^^^ lifetime `'static` required