diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2019-01-25 15:23:13 -0500 |
|---|---|---|
| committer | Rémy Rakic <remy.rakic@gmail.com> | 2019-01-27 10:52:44 +0100 |
| commit | ec6405bccd8b1f0933a3604bdd86c43707350275 (patch) | |
| tree | f08e569a71e03f80311dfdc01f094eb7acadc398 /src/test/ui/issues | |
| parent | ab80162e3ffe52ded81917b8f0c032c9bc9d3c58 (diff) | |
| download | rust-ec6405bccd8b1f0933a3604bdd86c43707350275.tar.gz rust-ec6405bccd8b1f0933a3604bdd86c43707350275.zip | |
identify when implemented for "some specific lifetime"
Diffstat (limited to 'src/test/ui/issues')
| -rw-r--r-- | src/test/ui/issues/issue-57362-1.stderr | 15 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-57362-2.stderr | 11 |
2 files changed, 14 insertions, 12 deletions
diff --git a/src/test/ui/issues/issue-57362-1.stderr b/src/test/ui/issues/issue-57362-1.stderr index d7886e5af27..06946bcf744 100644 --- a/src/test/ui/issues/issue-57362-1.stderr +++ b/src/test/ui/issues/issue-57362-1.stderr @@ -1,20 +1,11 @@ error: implementation of `Trait` is not general enough - --> $DIR/issue-57362.rs:20:7 + --> $DIR/issue-57362-1.rs:20:7 | LL | a.f(); //~ ERROR not general enough | ^ | - = note: `Trait` would have to be implemented for the type `fn(&u8)` + = note: `Trait` would have to be implemented for the type `fn(&'0 u8)`, for some specific lifetime `'0` = note: but `Trait` is actually implemented for the type `for<'r> fn(&'r u8)` -error: implementation of `X` is not general enough - --> $DIR/issue-57362.rs:38:13 - | -LL | let x = <fn (&())>::make_g(); //~ ERROR not general enough - | ^^^^^^^^^^^^^^^^^^ - | - = note: `X` would have to be implemented for the type `for<'r> fn(&'r ())` - = note: but `X` is actually implemented for the type `fn(&'0 ())`, for the specific lifetime `'0` - -error: aborting due to 2 previous errors +error: aborting due to previous error diff --git a/src/test/ui/issues/issue-57362-2.stderr b/src/test/ui/issues/issue-57362-2.stderr new file mode 100644 index 00000000000..782c78da3a2 --- /dev/null +++ b/src/test/ui/issues/issue-57362-2.stderr @@ -0,0 +1,11 @@ +error: implementation of `X` is not general enough + --> $DIR/issue-57362-2.rs:22:13 + | +LL | let x = <fn (&())>::make_g(); //~ ERROR not general enough + | ^^^^^^^^^^^^^^^^^^ + | + = note: `X` would have to be implemented for the type `for<'r> fn(&'r ())` + = note: but `X` is actually implemented for the type `fn(&'0 ())`, for the specific lifetime `'0` + +error: aborting due to previous error + |
