diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2018-09-25 11:32:58 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2018-09-26 09:38:26 -0400 |
| commit | e2deef32d4a2f07249c567534528d5264ba0a160 (patch) | |
| tree | 763f4c5b010655aa5f3f8a582dae53bcdb3ddd29 | |
| parent | ffe87f63eada242a94a762c4304b9fe059310289 (diff) | |
| download | rust-e2deef32d4a2f07249c567534528d5264ba0a160.tar.gz rust-e2deef32d4a2f07249c567534528d5264ba0a160.zip | |
pacify the mercilous tidy.
3 files changed, 15 insertions, 3 deletions
diff --git a/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.nll.stderr b/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.nll.stderr new file mode 100644 index 00000000000..1e953ecff69 --- /dev/null +++ b/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.nll.stderr @@ -0,0 +1,11 @@ +error[E0309]: the associated type `<T as MyTrait<'_>>::Output` may not live long enough + --> $DIR/projection-where-clause-env-wrong-lifetime.rs:14:5 + | +LL | bar::<<T as MyTrait<'a>>::Output>() + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: consider adding an explicit lifetime bound `<T as MyTrait<'_>>::Output: 'a`... + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0309`. diff --git a/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.rs b/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.rs index 07cc37a8b29..9e3590ca715 100644 --- a/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.rs +++ b/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.rs @@ -11,7 +11,8 @@ where for<'x> T: MyTrait<'x>, <T as MyTrait<'b>>::Output: 'a, { - bar::<<T as MyTrait<'a>>::Output>() //~ ERROR the associated type `<T as MyTrait<'a>>::Output` may not live long enough + bar::<<T as MyTrait<'a>>::Output>() + //~^ ERROR the associated type `<T as MyTrait<'a>>::Output` may not live long enough } fn bar<'a, T>() -> &'a () diff --git a/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.stderr b/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.stderr index c6d0037138c..d6ade2a603e 100644 --- a/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.stderr +++ b/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.stderr @@ -1,14 +1,14 @@ error[E0309]: the associated type `<T as MyTrait<'a>>::Output` may not live long enough --> $DIR/projection-where-clause-env-wrong-lifetime.rs:14:5 | -LL | bar::<<T as MyTrait<'a>>::Output>() //~ ERROR the associated type `<T as MyTrait<'a>>::Output` may not live long enough +LL | bar::<<T as MyTrait<'a>>::Output>() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `<T as MyTrait<'a>>::Output: 'a`... note: ...so that the type `<T as MyTrait<'a>>::Output` will meet its required lifetime bounds --> $DIR/projection-where-clause-env-wrong-lifetime.rs:14:5 | -LL | bar::<<T as MyTrait<'a>>::Output>() //~ ERROR the associated type `<T as MyTrait<'a>>::Output` may not live long enough +LL | bar::<<T as MyTrait<'a>>::Output>() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error |
