Skip to content

Commit 09d1774

Browse files
committed
Bless nll tests
1 parent d3871f5 commit 09d1774

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

src/test/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unrelated.nll.stderr

+6-5
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ error[E0700]: hidden type for `impl Trait` captures lifetime that does not appea
22
--> $DIR/ordinary-bounds-unrelated.rs:16:74
33
|
44
LL | fn upper_bounds<'a, 'b, 'c, 'd, 'e>(a: Ordinary<'a>, b: Ordinary<'b>) -> impl Trait<'d, 'e>
5-
| ^^^^^^^^^^^^^^^^^^
5+
| -- ^^^^^^^^^^^^^^^^^^
6+
| |
7+
| hidden type `Ordinary<'b>` captures the lifetime `'b` as defined here
68
|
7-
note: hidden type `Ordinary<'b>` captures the lifetime `'b` as defined on the function body at 16:21
8-
--> $DIR/ordinary-bounds-unrelated.rs:16:21
9+
help: to declare that the `impl Trait` captures 'b, you can add an explicit `'b` lifetime bound
910
|
10-
LL | fn upper_bounds<'a, 'b, 'c, 'd, 'e>(a: Ordinary<'a>, b: Ordinary<'b>) -> impl Trait<'d, 'e>
11-
| ^^
11+
LL | fn upper_bounds<'a, 'b, 'c, 'd, 'e>(a: Ordinary<'a>, b: Ordinary<'b>) -> impl Trait<'d, 'e> + 'b
12+
| ++++
1213

1314
error: aborting due to previous error
1415

src/test/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unsuited.nll.stderr

+6-5
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ error[E0700]: hidden type for `impl Trait` captures lifetime that does not appea
22
--> $DIR/ordinary-bounds-unsuited.rs:18:62
33
|
44
LL | fn upper_bounds<'a, 'b>(a: Ordinary<'a>, b: Ordinary<'b>) -> impl Trait<'a, 'b>
5-
| ^^^^^^^^^^^^^^^^^^
5+
| -- ^^^^^^^^^^^^^^^^^^
6+
| |
7+
| hidden type `Ordinary<'b>` captures the lifetime `'b` as defined here
68
|
7-
note: hidden type `Ordinary<'b>` captures the lifetime `'b` as defined on the function body at 18:21
8-
--> $DIR/ordinary-bounds-unsuited.rs:18:21
9+
help: to declare that the `impl Trait` captures 'b, you can add an explicit `'b` lifetime bound
910
|
10-
LL | fn upper_bounds<'a, 'b>(a: Ordinary<'a>, b: Ordinary<'b>) -> impl Trait<'a, 'b>
11-
| ^^
11+
LL | fn upper_bounds<'a, 'b>(a: Ordinary<'a>, b: Ordinary<'b>) -> impl Trait<'a, 'b> + 'b
12+
| ++++
1213

1314
error: aborting due to previous error
1415

src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature-2.nll.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | | t.test();
77
LL | | });
88
| |______^
99
|
10-
note: the parameter type `T` must be valid for the anonymous lifetime defined on the function body at 19:24...
10+
note: the parameter type `T` must be valid for the anonymous lifetime defined here...
1111
--> $DIR/missing-lifetimes-in-signature-2.rs:19:24
1212
|
1313
LL | fn func<T: Test>(foo: &Foo, t: T) {

0 commit comments

Comments
 (0)