Bless nll tests

This commit is contained in:
Oli Scherer 2021-10-08 18:30:58 +00:00
parent 888ba509ea
commit ab7721d694
2 changed files with 12 additions and 10 deletions

View File

@ -2,13 +2,14 @@ error[E0700]: hidden type for `impl Trait` captures lifetime that does not appea
--> $DIR/ordinary-bounds-unrelated.rs:16:74
|
LL | fn upper_bounds<'a, 'b, 'c, 'd, 'e>(a: Ordinary<'a>, b: Ordinary<'b>) -> impl Trait<'d, 'e>
| ^^^^^^^^^^^^^^^^^^
| -- ^^^^^^^^^^^^^^^^^^
| |
| hidden type `Ordinary<'b>` captures the lifetime `'b` as defined here
|
note: hidden type `Ordinary<'b>` captures the lifetime `'b` as defined here
--> $DIR/ordinary-bounds-unrelated.rs:16:21
help: to declare that the `impl Trait` captures 'b, you can add an explicit `'b` lifetime bound
|
LL | fn upper_bounds<'a, 'b, 'c, 'd, 'e>(a: Ordinary<'a>, b: Ordinary<'b>) -> impl Trait<'d, 'e>
| ^^
LL | fn upper_bounds<'a, 'b, 'c, 'd, 'e>(a: Ordinary<'a>, b: Ordinary<'b>) -> impl Trait<'d, 'e> + 'b
| ++++
error: aborting due to previous error

View File

@ -2,13 +2,14 @@ error[E0700]: hidden type for `impl Trait` captures lifetime that does not appea
--> $DIR/ordinary-bounds-unsuited.rs:18:62
|
LL | fn upper_bounds<'a, 'b>(a: Ordinary<'a>, b: Ordinary<'b>) -> impl Trait<'a, 'b>
| ^^^^^^^^^^^^^^^^^^
| -- ^^^^^^^^^^^^^^^^^^
| |
| hidden type `Ordinary<'b>` captures the lifetime `'b` as defined here
|
note: hidden type `Ordinary<'b>` captures the lifetime `'b` as defined here
--> $DIR/ordinary-bounds-unsuited.rs:18:21
help: to declare that the `impl Trait` captures 'b, you can add an explicit `'b` lifetime bound
|
LL | fn upper_bounds<'a, 'b>(a: Ordinary<'a>, b: Ordinary<'b>) -> impl Trait<'a, 'b>
| ^^
LL | fn upper_bounds<'a, 'b>(a: Ordinary<'a>, b: Ordinary<'b>) -> impl Trait<'a, 'b> + 'b
| ++++
error: aborting due to previous error