Skip to content

Commit a807032

Browse files
committed
./x.py test --bless --compare-mode=nll
1 parent 19c07cc commit a807032

6 files changed

+258
-288
lines changed

src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.nll.stderr

+7-8
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ LL | async fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f }
77
= note: hidden type `impl std::future::Future` captures lifetime '_#15r
88

99
error: lifetime may not live long enough
10-
--> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:8:50
10+
--> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:8:52
1111
|
1212
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 `'_`
13+
| - ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
1414
| |
1515
| lifetime `'_` defined here
1616
| lifetime `'_` defined here
1717

1818
error: lifetime may not live long enough
19-
--> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:11:73
19+
--> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:11:75
2020
|
2121
LL | async fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) }
22-
| - ^^^^^^^^^^^^^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
22+
| - ^^^^^^^^^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
2323
| |
2424
| lifetime `'_` defined here
2525
| lifetime `'_` defined here
@@ -33,12 +33,11 @@ LL | async fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg }
3333
= note: hidden type `impl std::future::Future` captures lifetime '_#15r
3434

3535
error: lifetime may not live long enough
36-
--> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:17:62
36+
--> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:17:64
3737
|
3838
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
39+
| -- - lifetime `'_` defined here ^^^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'a`
40+
| |
4241
| lifetime `'a` defined here
4342

4443
error: aborting due to 5 previous errors

src/test/ui/self/elision/lt-ref-self-async.nll.stderr

+54-60
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,15 @@ LL | async fn ref_self(&self, f: &u32) -> &u32 {
77
= note: hidden type `impl std::future::Future` captures lifetime '_#23r
88

99
error: lifetime may not live long enough
10-
--> $DIR/lt-ref-self-async.rs:13: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 `'_`
10+
--> $DIR/lt-ref-self-async.rs:14:9
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+
| ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
2019

2120
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
2221
--> $DIR/lt-ref-self-async.rs:19:48
@@ -27,16 +26,15 @@ LL | async fn ref_Self(self: &Self, f: &u32) -> &u32 {
2726
= note: hidden type `impl std::future::Future` captures lifetime '_#23r
2827

2928
error: lifetime may not live long enough
30-
--> $DIR/lt-ref-self-async.rs:19: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 `'_`
29+
--> $DIR/lt-ref-self-async.rs:20:9
30+
|
31+
LL | async fn ref_Self(self: &Self, f: &u32) -> &u32 {
32+
| -
33+
| |
34+
| lifetime `'_` defined here
35+
| lifetime `'_` defined here
36+
LL | f
37+
| ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
4038

4139
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
4240
--> $DIR/lt-ref-self-async.rs:23:57
@@ -47,16 +45,15 @@ LL | async fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 {
4745
= note: hidden type `impl std::future::Future` captures lifetime '_#23r
4846

4947
error: lifetime may not live long enough
50-
--> $DIR/lt-ref-self-async.rs:23:62
51-
|
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 `'_`
48+
--> $DIR/lt-ref-self-async.rs:24:9
49+
|
50+
LL | async fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 {
51+
| -
52+
| |
53+
| lifetime `'_` defined here
54+
| lifetime `'_` defined here
55+
LL | f
56+
| ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
6057

6158
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
6259
--> $DIR/lt-ref-self-async.rs:27:57
@@ -67,16 +64,15 @@ LL | async fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 {
6764
= note: hidden type `impl std::future::Future` captures lifetime '_#23r
6865

6966
error: lifetime may not live long enough
70-
--> $DIR/lt-ref-self-async.rs:27:62
71-
|
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 `'_`
67+
--> $DIR/lt-ref-self-async.rs:28:9
68+
|
69+
LL | async fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 {
70+
| -
71+
| |
72+
| lifetime `'_` defined here
73+
| lifetime `'_` defined here
74+
LL | f
75+
| ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
8076

8177
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
8278
--> $DIR/lt-ref-self-async.rs:31:66
@@ -87,16 +83,15 @@ LL | async fn box_box_ref_Self(self: Box<Box<&Self>>, f: &u32) -> &u32 {
8783
= note: hidden type `impl std::future::Future` captures lifetime '_#23r
8884

8985
error: lifetime may not live long enough
90-
--> $DIR/lt-ref-self-async.rs:31: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 `'_`
86+
--> $DIR/lt-ref-self-async.rs:32:9
87+
|
88+
LL | async fn box_box_ref_Self(self: Box<Box<&Self>>, f: &u32) -> &u32 {
89+
| -
90+
| |
91+
| lifetime `'_` defined here
92+
| lifetime `'_` defined here
93+
LL | f
94+
| ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
10095

10196
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
10297
--> $DIR/lt-ref-self-async.rs:35:62
@@ -107,16 +102,15 @@ LL | async fn box_pin_Self(self: Box<Pin<&Self>>, f: &u32) -> &u32 {
107102
= note: hidden type `impl std::future::Future` captures lifetime '_#23r
108103

109104
error: lifetime may not live long enough
110-
--> $DIR/lt-ref-self-async.rs:35:67
111-
|
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 `'_`
105+
--> $DIR/lt-ref-self-async.rs:36:9
106+
|
107+
LL | async fn box_pin_Self(self: Box<Pin<&Self>>, f: &u32) -> &u32 {
108+
| -
109+
| |
110+
| lifetime `'_` defined here
111+
| lifetime `'_` defined here
112+
LL | f
113+
| ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
120114

121115
error: aborting due to 12 previous errors
122116

src/test/ui/self/elision/ref-mut-self-async.nll.stderr

+54-60
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,15 @@ LL | async fn ref_self(&mut self, f: &u32) -> &u32 {
77
= note: hidden type `impl std::future::Future` captures lifetime '_#15r
88

99
error: lifetime may not live long enough
10-
--> $DIR/ref-mut-self-async.rs:13: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 `'_`
10+
--> $DIR/ref-mut-self-async.rs:14:9
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+
| ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
2019

2120
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
2221
--> $DIR/ref-mut-self-async.rs:19:52
@@ -27,16 +26,15 @@ LL | async fn ref_Self(self: &mut Self, f: &u32) -> &u32 {
2726
= note: hidden type `impl std::future::Future` captures lifetime '_#15r
2827

2928
error: lifetime may not live long enough
30-
--> $DIR/ref-mut-self-async.rs:19: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 `'_`
29+
--> $DIR/ref-mut-self-async.rs:20:9
30+
|
31+
LL | async fn ref_Self(self: &mut Self, f: &u32) -> &u32 {
32+
| -
33+
| |
34+
| lifetime `'_` defined here
35+
| lifetime `'_` defined here
36+
LL | f
37+
| ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
4038

4139
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
4240
--> $DIR/ref-mut-self-async.rs:23:61
@@ -47,16 +45,15 @@ LL | async fn box_ref_Self(self: Box<&mut Self>, f: &u32) -> &u32 {
4745
= note: hidden type `impl std::future::Future` captures lifetime '_#15r
4846

4947
error: lifetime may not live long enough
50-
--> $DIR/ref-mut-self-async.rs:23:66
51-
|
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 `'_`
48+
--> $DIR/ref-mut-self-async.rs:24:9
49+
|
50+
LL | async fn box_ref_Self(self: Box<&mut Self>, f: &u32) -> &u32 {
51+
| -
52+
| |
53+
| lifetime `'_` defined here
54+
| lifetime `'_` defined here
55+
LL | f
56+
| ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
6057

6158
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
6259
--> $DIR/ref-mut-self-async.rs:27:61
@@ -67,16 +64,15 @@ LL | async fn pin_ref_Self(self: Pin<&mut Self>, f: &u32) -> &u32 {
6764
= note: hidden type `impl std::future::Future` captures lifetime '_#15r
6865

6966
error: lifetime may not live long enough
70-
--> $DIR/ref-mut-self-async.rs:27:66
71-
|
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 `'_`
67+
--> $DIR/ref-mut-self-async.rs:28:9
68+
|
69+
LL | async fn pin_ref_Self(self: Pin<&mut Self>, f: &u32) -> &u32 {
70+
| -
71+
| |
72+
| lifetime `'_` defined here
73+
| lifetime `'_` defined here
74+
LL | f
75+
| ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
8076

8177
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
8278
--> $DIR/ref-mut-self-async.rs:31:70
@@ -87,16 +83,15 @@ LL | async fn box_box_ref_Self(self: Box<Box<&mut Self>>, f: &u32) -> &u32 {
8783
= note: hidden type `impl std::future::Future` captures lifetime '_#15r
8884

8985
error: lifetime may not live long enough
90-
--> $DIR/ref-mut-self-async.rs:31: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 `'_`
86+
--> $DIR/ref-mut-self-async.rs:32:9
87+
|
88+
LL | async fn box_box_ref_Self(self: Box<Box<&mut Self>>, f: &u32) -> &u32 {
89+
| -
90+
| |
91+
| lifetime `'_` defined here
92+
| lifetime `'_` defined here
93+
LL | f
94+
| ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
10095

10196
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
10297
--> $DIR/ref-mut-self-async.rs:35:70
@@ -107,16 +102,15 @@ LL | async fn box_pin_ref_Self(self: Box<Pin<&mut Self>>, f: &u32) -> &u32 {
107102
= note: hidden type `impl std::future::Future` captures lifetime '_#15r
108103

109104
error: lifetime may not live long enough
110-
--> $DIR/ref-mut-self-async.rs:35:75
111-
|
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 `'_`
105+
--> $DIR/ref-mut-self-async.rs:36:9
106+
|
107+
LL | async fn box_pin_ref_Self(self: Box<Pin<&mut Self>>, f: &u32) -> &u32 {
108+
| -
109+
| |
110+
| lifetime `'_` defined here
111+
| lifetime `'_` defined here
112+
LL | f
113+
| ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
120114

121115
error: aborting due to 12 previous errors
122116

0 commit comments

Comments
 (0)