Skip to content

Commit 18d69c8

Browse files
committed
bless tests with compare-mode=nll
1 parent d7c7c52 commit 18d69c8

8 files changed

+538
-136
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
2+
--> $DIR/issue-63388-1.rs:14:10
3+
|
4+
LL | ) -> &dyn Foo
5+
| ^^^^^^^^
6+
|
7+
= note: hidden type `impl std::future::Future` captures lifetime '_#27r
8+
9+
error: lifetime may not live long enough
10+
--> $DIR/issue-63388-1.rs:15:5
11+
|
12+
LL | async fn do_sth<'a>(
13+
| -- lifetime `'a` defined here
14+
LL | &'a self, foo: &dyn Foo
15+
| - lifetime `'_` defined here
16+
LL | ) -> &dyn Foo
17+
LL | / {
18+
LL | | foo
19+
LL | | }
20+
| |_____^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'_`
21+
22+
error: aborting due to 2 previous errors
23+
24+
For more information about this error, try `rustc --explain E0700`.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
error[E0106]: missing lifetime specifier
2+
--> $DIR/issue-63388-2.rs:14:10
3+
|
4+
LL | ) -> &dyn Foo
5+
| ^ help: consider using the named lifetime: `&'a`
6+
|
7+
= help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from `foo` or `bar`
8+
9+
error: aborting due to previous error
10+
11+
For more information about this error, try `rustc --explain E0106`.
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,46 @@
1-
error[E0106]: missing lifetime specifier
1+
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
22
--> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:10:45
33
|
44
LL | async fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f }
5-
| ^
5+
| ^^^^
66
|
7-
= note: return-position elided lifetimes require exactly one input-position elided lifetime, found multiple.
7+
= note: hidden type `impl std::future::Future` captures lifetime '_#18r
88

9-
error[E0106]: missing lifetime specifier
10-
--> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:15:60
9+
error: lifetime may not live long enough
10+
--> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:10:50
1111
|
12-
LL | async fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) }
13-
| ^
14-
|
15-
= note: return-position elided lifetimes require exactly one input-position elided lifetime, found multiple.
12+
LL | async fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f }
13+
| - ^^^^^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
14+
| |
15+
| lifetime `'_` defined here
16+
| lifetime `'_` defined here
1617

17-
error[E0106]: missing lifetime specifier
18-
--> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:15:67
18+
error: lifetime may not live long enough
19+
--> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:13:73
1920
|
2021
LL | async fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) }
21-
| ^
22+
| - ^^^^^^^^^^^^^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
23+
| |
24+
| lifetime `'_` defined here
25+
| lifetime `'_` defined here
26+
27+
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
28+
--> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:19:58
29+
|
30+
LL | async fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg }
31+
| ^^^
32+
|
33+
= note: hidden type `impl std::future::Future` captures lifetime '_#18r
34+
35+
error: lifetime may not live long enough
36+
--> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:19:62
2237
|
23-
= note: return-position elided lifetimes require exactly one input-position elided lifetime, found multiple.
38+
LL | async fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg }
39+
| -- - ^^^^^^^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'a`
40+
| | |
41+
| | lifetime `'_` defined here
42+
| lifetime `'a` defined here
2443

25-
error: aborting due to 3 previous errors
44+
error: aborting due to 5 previous errors
2645

27-
For more information about this error, try `rustc --explain E0106`.
46+
For more information about this error, try `rustc --explain E0700`.
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,123 @@
1-
error[E0106]: missing lifetime specifier
1+
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
22
--> $DIR/lt-ref-self-async.rs:15:42
33
|
44
LL | async fn ref_self(&self, f: &u32) -> &u32 {
5-
| ^
5+
| ^^^^
66
|
7-
= note: return-position elided lifetimes require exactly one input-position elided lifetime, found multiple.
7+
= note: hidden type `impl std::future::Future` captures lifetime '_#28r
88

9-
error[E0106]: missing lifetime specifier
10-
--> $DIR/lt-ref-self-async.rs:23:48
9+
error: lifetime may not live long enough
10+
--> $DIR/lt-ref-self-async.rs:15:47
11+
|
12+
LL | async fn ref_self(&self, f: &u32) -> &u32 {
13+
| _______________________-_______________________^
14+
| | |
15+
| | lifetime `'_` defined here
16+
| | lifetime `'_` defined here
17+
LL | | f
18+
LL | | }
19+
| |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
20+
21+
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
22+
--> $DIR/lt-ref-self-async.rs:21:48
1123
|
1224
LL | async fn ref_Self(self: &Self, f: &u32) -> &u32 {
13-
| ^
25+
| ^^^^
1426
|
15-
= note: return-position elided lifetimes require exactly one input-position elided lifetime, found multiple.
27+
= note: hidden type `impl std::future::Future` captures lifetime '_#28r
1628

17-
error[E0106]: missing lifetime specifier
18-
--> $DIR/lt-ref-self-async.rs:29:57
29+
error: lifetime may not live long enough
30+
--> $DIR/lt-ref-self-async.rs:21:53
31+
|
32+
LL | async fn ref_Self(self: &Self, f: &u32) -> &u32 {
33+
| _____________________________-_______________________^
34+
| | |
35+
| | lifetime `'_` defined here
36+
| | lifetime `'_` defined here
37+
LL | | f
38+
LL | | }
39+
| |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
40+
41+
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
42+
--> $DIR/lt-ref-self-async.rs:25:57
1943
|
2044
LL | async fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 {
21-
| ^
45+
| ^^^^
46+
|
47+
= note: hidden type `impl std::future::Future` captures lifetime '_#28r
48+
49+
error: lifetime may not live long enough
50+
--> $DIR/lt-ref-self-async.rs:25:62
2251
|
23-
= note: return-position elided lifetimes require exactly one input-position elided lifetime, found multiple.
52+
LL | async fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 {
53+
| _____________________________________-________________________^
54+
| | |
55+
| | lifetime `'_` defined here
56+
| | lifetime `'_` defined here
57+
LL | | f
58+
LL | | }
59+
| |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
2460

25-
error[E0106]: missing lifetime specifier
26-
--> $DIR/lt-ref-self-async.rs:35:57
61+
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
62+
--> $DIR/lt-ref-self-async.rs:29:57
2763
|
2864
LL | async fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 {
29-
| ^
65+
| ^^^^
66+
|
67+
= note: hidden type `impl std::future::Future` captures lifetime '_#28r
68+
69+
error: lifetime may not live long enough
70+
--> $DIR/lt-ref-self-async.rs:29:62
3071
|
31-
= note: return-position elided lifetimes require exactly one input-position elided lifetime, found multiple.
72+
LL | async fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 {
73+
| _____________________________________-________________________^
74+
| | |
75+
| | lifetime `'_` defined here
76+
| | lifetime `'_` defined here
77+
LL | | f
78+
LL | | }
79+
| |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
3280

33-
error[E0106]: missing lifetime specifier
34-
--> $DIR/lt-ref-self-async.rs:41:66
81+
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
82+
--> $DIR/lt-ref-self-async.rs:33:66
3583
|
3684
LL | async fn box_box_ref_Self(self: Box<Box<&Self>>, f: &u32) -> &u32 {
37-
| ^
85+
| ^^^^
3886
|
39-
= note: return-position elided lifetimes require exactly one input-position elided lifetime, found multiple.
87+
= note: hidden type `impl std::future::Future` captures lifetime '_#28r
4088

41-
error[E0106]: missing lifetime specifier
42-
--> $DIR/lt-ref-self-async.rs:47:62
89+
error: lifetime may not live long enough
90+
--> $DIR/lt-ref-self-async.rs:33:71
91+
|
92+
LL | async fn box_box_ref_Self(self: Box<Box<&Self>>, f: &u32) -> &u32 {
93+
| _____________________________________________-_________________________^
94+
| | |
95+
| | lifetime `'_` defined here
96+
| | lifetime `'_` defined here
97+
LL | | f
98+
LL | | }
99+
| |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
100+
101+
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
102+
--> $DIR/lt-ref-self-async.rs:37:62
43103
|
44104
LL | async fn box_pin_Self(self: Box<Pin<&Self>>, f: &u32) -> &u32 {
45-
| ^
105+
| ^^^^
106+
|
107+
= note: hidden type `impl std::future::Future` captures lifetime '_#28r
108+
109+
error: lifetime may not live long enough
110+
--> $DIR/lt-ref-self-async.rs:37:67
46111
|
47-
= note: return-position elided lifetimes require exactly one input-position elided lifetime, found multiple.
112+
LL | async fn box_pin_Self(self: Box<Pin<&Self>>, f: &u32) -> &u32 {
113+
| _________________________________________-_________________________^
114+
| | |
115+
| | lifetime `'_` defined here
116+
| | lifetime `'_` defined here
117+
LL | | f
118+
LL | | }
119+
| |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
48120

49-
error: aborting due to 6 previous errors
121+
error: aborting due to 12 previous errors
50122

51-
For more information about this error, try `rustc --explain E0106`.
123+
For more information about this error, try `rustc --explain E0700`.
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,123 @@
1-
error[E0106]: missing lifetime specifier
1+
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
22
--> $DIR/ref-mut-self-async.rs:15:46
33
|
44
LL | async fn ref_self(&mut self, f: &u32) -> &u32 {
5-
| ^
5+
| ^^^^
66
|
7-
= note: return-position elided lifetimes require exactly one input-position elided lifetime, found multiple.
7+
= note: hidden type `impl std::future::Future` captures lifetime '_#18r
88

9-
error[E0106]: missing lifetime specifier
10-
--> $DIR/ref-mut-self-async.rs:23:52
9+
error: lifetime may not live long enough
10+
--> $DIR/ref-mut-self-async.rs:15:51
11+
|
12+
LL | async fn ref_self(&mut self, f: &u32) -> &u32 {
13+
| _______________________-___________________________^
14+
| | |
15+
| | lifetime `'_` defined here
16+
| | lifetime `'_` defined here
17+
LL | | f
18+
LL | | }
19+
| |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
20+
21+
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
22+
--> $DIR/ref-mut-self-async.rs:21:52
1123
|
1224
LL | async fn ref_Self(self: &mut Self, f: &u32) -> &u32 {
13-
| ^
25+
| ^^^^
1426
|
15-
= note: return-position elided lifetimes require exactly one input-position elided lifetime, found multiple.
27+
= note: hidden type `impl std::future::Future` captures lifetime '_#18r
1628

17-
error[E0106]: missing lifetime specifier
18-
--> $DIR/ref-mut-self-async.rs:29:61
29+
error: lifetime may not live long enough
30+
--> $DIR/ref-mut-self-async.rs:21:57
31+
|
32+
LL | async fn ref_Self(self: &mut Self, f: &u32) -> &u32 {
33+
| _____________________________-___________________________^
34+
| | |
35+
| | lifetime `'_` defined here
36+
| | lifetime `'_` defined here
37+
LL | | f
38+
LL | | }
39+
| |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
40+
41+
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
42+
--> $DIR/ref-mut-self-async.rs:25:61
1943
|
2044
LL | async fn box_ref_Self(self: Box<&mut Self>, f: &u32) -> &u32 {
21-
| ^
45+
| ^^^^
46+
|
47+
= note: hidden type `impl std::future::Future` captures lifetime '_#18r
48+
49+
error: lifetime may not live long enough
50+
--> $DIR/ref-mut-self-async.rs:25:66
2251
|
23-
= note: return-position elided lifetimes require exactly one input-position elided lifetime, found multiple.
52+
LL | async fn box_ref_Self(self: Box<&mut Self>, f: &u32) -> &u32 {
53+
| _____________________________________-____________________________^
54+
| | |
55+
| | lifetime `'_` defined here
56+
| | lifetime `'_` defined here
57+
LL | | f
58+
LL | | }
59+
| |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
2460

25-
error[E0106]: missing lifetime specifier
26-
--> $DIR/ref-mut-self-async.rs:35:61
61+
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
62+
--> $DIR/ref-mut-self-async.rs:29:61
2763
|
2864
LL | async fn pin_ref_Self(self: Pin<&mut Self>, f: &u32) -> &u32 {
29-
| ^
65+
| ^^^^
66+
|
67+
= note: hidden type `impl std::future::Future` captures lifetime '_#18r
68+
69+
error: lifetime may not live long enough
70+
--> $DIR/ref-mut-self-async.rs:29:66
3071
|
31-
= note: return-position elided lifetimes require exactly one input-position elided lifetime, found multiple.
72+
LL | async fn pin_ref_Self(self: Pin<&mut Self>, f: &u32) -> &u32 {
73+
| _____________________________________-____________________________^
74+
| | |
75+
| | lifetime `'_` defined here
76+
| | lifetime `'_` defined here
77+
LL | | f
78+
LL | | }
79+
| |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
3280

33-
error[E0106]: missing lifetime specifier
34-
--> $DIR/ref-mut-self-async.rs:41:70
81+
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
82+
--> $DIR/ref-mut-self-async.rs:33:70
3583
|
3684
LL | async fn box_box_ref_Self(self: Box<Box<&mut Self>>, f: &u32) -> &u32 {
37-
| ^
85+
| ^^^^
3886
|
39-
= note: return-position elided lifetimes require exactly one input-position elided lifetime, found multiple.
87+
= note: hidden type `impl std::future::Future` captures lifetime '_#18r
4088

41-
error[E0106]: missing lifetime specifier
42-
--> $DIR/ref-mut-self-async.rs:47:70
89+
error: lifetime may not live long enough
90+
--> $DIR/ref-mut-self-async.rs:33:75
91+
|
92+
LL | async fn box_box_ref_Self(self: Box<Box<&mut Self>>, f: &u32) -> &u32 {
93+
| _____________________________________________-_____________________________^
94+
| | |
95+
| | lifetime `'_` defined here
96+
| | lifetime `'_` defined here
97+
LL | | f
98+
LL | | }
99+
| |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
100+
101+
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
102+
--> $DIR/ref-mut-self-async.rs:37:70
43103
|
44104
LL | async fn box_pin_ref_Self(self: Box<Pin<&mut Self>>, f: &u32) -> &u32 {
45-
| ^
105+
| ^^^^
106+
|
107+
= note: hidden type `impl std::future::Future` captures lifetime '_#18r
108+
109+
error: lifetime may not live long enough
110+
--> $DIR/ref-mut-self-async.rs:37:75
46111
|
47-
= note: return-position elided lifetimes require exactly one input-position elided lifetime, found multiple.
112+
LL | async fn box_pin_ref_Self(self: Box<Pin<&mut Self>>, f: &u32) -> &u32 {
113+
| _____________________________________________-_____________________________^
114+
| | |
115+
| | lifetime `'_` defined here
116+
| | lifetime `'_` defined here
117+
LL | | f
118+
LL | | }
119+
| |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
48120

49-
error: aborting due to 6 previous errors
121+
error: aborting due to 12 previous errors
50122

51-
For more information about this error, try `rustc --explain E0106`.
123+
For more information about this error, try `rustc --explain E0700`.

0 commit comments

Comments
 (0)