Skip to content

Commit 75d1e30

Browse files
committed
Update test cases
1 parent ce1a521 commit 75d1e30

11 files changed

+54
-54
lines changed

src/test/ui/issues/issue-16683.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ error[E0495]: cannot infer an appropriate lifetime for autoref due to conflictin
44
LL | self.a();
55
| ^
66
|
7-
note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the method body at 3:5...
8-
--> $DIR/issue-16683.rs:3:5
7+
note: first, the lifetime cannot outlive the anonymous lifetime defined on the method body at 3:10...
8+
--> $DIR/issue-16683.rs:3:10
99
|
1010
LL | fn b(&self) {
11-
| ^^^^^^^^^^^
11+
| ^^^^^
1212
note: ...so that reference does not outlive borrowed content
1313
--> $DIR/issue-16683.rs:4:9
1414
|

src/test/ui/issues/issue-17740.stderr

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ LL | fn bar(self: &mut Foo) {
66
|
77
= note: expected struct `Foo<'a>`
88
found struct `Foo<'_>`
9-
note: the anonymous lifetime #2 defined on the method body at 6:5...
10-
--> $DIR/issue-17740.rs:6:5
9+
note: the anonymous lifetime defined on the method body at 6:23...
10+
--> $DIR/issue-17740.rs:6:23
1111
|
1212
LL | fn bar(self: &mut Foo) {
13-
| ^^^^^^^^^^^^^^^^^^^^^^
13+
| ^^^
1414
note: ...does not necessarily outlive the lifetime `'a` as defined on the impl at 5:7
1515
--> $DIR/issue-17740.rs:5:7
1616
|
@@ -30,11 +30,11 @@ note: the lifetime `'a` as defined on the impl at 5:7...
3030
|
3131
LL | impl <'a> Foo<'a>{
3232
| ^^
33-
note: ...does not necessarily outlive the anonymous lifetime #2 defined on the method body at 6:5
34-
--> $DIR/issue-17740.rs:6:5
33+
note: ...does not necessarily outlive the anonymous lifetime defined on the method body at 6:23
34+
--> $DIR/issue-17740.rs:6:23
3535
|
3636
LL | fn bar(self: &mut Foo) {
37-
| ^^^^^^^^^^^^^^^^^^^^^^
37+
| ^^^
3838

3939
error: aborting due to 2 previous errors
4040

src/test/ui/issues/issue-17758.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ error[E0495]: cannot infer an appropriate lifetime for autoref due to conflictin
44
LL | self.foo();
55
| ^^^
66
|
7-
note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the method body at 6:5...
8-
--> $DIR/issue-17758.rs:6:5
7+
note: first, the lifetime cannot outlive the anonymous lifetime defined on the method body at 6:12...
8+
--> $DIR/issue-17758.rs:6:12
99
|
1010
LL | fn bar(&self) {
11-
| ^^^^^^^^^^^^^
11+
| ^^^^^
1212
note: ...so that reference does not outlive borrowed content
1313
--> $DIR/issue-17758.rs:7:9
1414
|

src/test/ui/issues/issue-17905-2.stderr

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ LL | fn say(self: &Pair<&str, isize>) {
66
|
77
= note: expected struct `Pair<&str, _>`
88
found struct `Pair<&str, _>`
9-
note: the anonymous lifetime #2 defined on the method body at 8:5...
10-
--> $DIR/issue-17905-2.rs:8:5
9+
note: the anonymous lifetime defined on the method body at 8:24...
10+
--> $DIR/issue-17905-2.rs:8:24
1111
|
1212
LL | fn say(self: &Pair<&str, isize>) {
13-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13+
| ^^^^
1414
note: ...does not necessarily outlive the lifetime `'_` as defined on the impl at 5:5
1515
--> $DIR/issue-17905-2.rs:5:5
1616
|
@@ -30,11 +30,11 @@ note: the lifetime `'_` as defined on the impl at 5:5...
3030
|
3131
LL | &str,
3232
| ^
33-
note: ...does not necessarily outlive the anonymous lifetime #2 defined on the method body at 8:5
34-
--> $DIR/issue-17905-2.rs:8:5
33+
note: ...does not necessarily outlive the anonymous lifetime defined on the method body at 8:24
34+
--> $DIR/issue-17905-2.rs:8:24
3535
|
3636
LL | fn say(self: &Pair<&str, isize>) {
37-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
37+
| ^^^^
3838

3939
error: aborting due to 2 previous errors
4040

src/test/ui/issues/issue-20831-debruijn.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` d
44
LL | fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
7-
note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the method body at 28:5...
8-
--> $DIR/issue-20831-debruijn.rs:28:5
7+
note: first, the lifetime cannot outlive the anonymous lifetime defined on the method body at 28:58...
8+
--> $DIR/issue-20831-debruijn.rs:28:58
99
|
1010
LL | fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
11-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
1212
note: ...but the lifetime must also be valid for the lifetime `'a` as defined on the impl at 26:6...
1313
--> $DIR/issue-20831-debruijn.rs:26:6
1414
|

src/test/ui/issues/issue-27942.stderr

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ LL | fn select(&self) -> BufferViewHandle<R>;
66
|
77
= note: expected type `Resources<'_>`
88
found type `Resources<'a>`
9-
note: the anonymous lifetime #1 defined on the method body at 5:5...
10-
--> $DIR/issue-27942.rs:5:5
9+
note: the anonymous lifetime defined on the method body at 5:15...
10+
--> $DIR/issue-27942.rs:5:15
1111
|
1212
LL | fn select(&self) -> BufferViewHandle<R>;
13-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13+
| ^^^^^
1414
note: ...does not necessarily outlive the lifetime `'a` as defined on the trait at 3:18
1515
--> $DIR/issue-27942.rs:3:18
1616
|
@@ -30,11 +30,11 @@ note: the lifetime `'a` as defined on the trait at 3:18...
3030
|
3131
LL | pub trait Buffer<'a, R: Resources<'a>> {
3232
| ^^
33-
note: ...does not necessarily outlive the anonymous lifetime #1 defined on the method body at 5:5
34-
--> $DIR/issue-27942.rs:5:5
33+
note: ...does not necessarily outlive the anonymous lifetime defined on the method body at 5:15
34+
--> $DIR/issue-27942.rs:5:15
3535
|
3636
LL | fn select(&self) -> BufferViewHandle<R>;
37-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
37+
| ^^^^^
3838

3939
error: aborting due to 2 previous errors
4040

src/test/ui/nll/issue-52742.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ note: ...the reference is valid for the lifetime `'_` as defined on the impl at
99
|
1010
LL | impl Foo<'_, '_> {
1111
| ^^
12-
note: ...but the borrowed content is only valid for the anonymous lifetime #2 defined on the method body at 13:5
13-
--> $DIR/issue-52742.rs:13:5
12+
note: ...but the borrowed content is only valid for the anonymous lifetime defined on the method body at 13:31
13+
--> $DIR/issue-52742.rs:13:31
1414
|
1515
LL | fn take_bar(&mut self, b: Bar<'_>) {
16-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16+
| ^^^^^^^
1717

1818
error: aborting due to previous error
1919

src/test/ui/nll/issue-55394.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'s` d
44
LL | Foo { bar }
55
| ^^^
66
|
7-
note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the method body at 8:5...
8-
--> $DIR/issue-55394.rs:8:5
7+
note: first, the lifetime cannot outlive the anonymous lifetime defined on the method body at 8:17...
8+
--> $DIR/issue-55394.rs:8:17
99
|
1010
LL | fn new(bar: &mut Bar) -> Self {
11-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11+
| ^^^^^^^^
1212
note: ...so that reference does not outlive borrowed content
1313
--> $DIR/issue-55394.rs:9:15
1414
|

src/test/ui/nll/type-alias-free-regions.stderr

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` d
44
LL | C { f: b }
55
| ^
66
|
7-
note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the method body at 16:5...
8-
--> $DIR/type-alias-free-regions.rs:16:5
7+
note: first, the lifetime cannot outlive the anonymous lifetime defined on the method body at 16:24...
8+
--> $DIR/type-alias-free-regions.rs:16:24
99
|
1010
LL | fn from_box(b: Box<B>) -> Self {
11-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11+
| ^
1212
note: ...so that the expression is assignable
1313
--> $DIR/type-alias-free-regions.rs:17:16
1414
|
@@ -35,11 +35,11 @@ error[E0495]: cannot infer an appropriate lifetime due to conflicting requiremen
3535
LL | C { f: Box::new(b.0) }
3636
| ^^^^^^^^^^^^^
3737
|
38-
note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the method body at 26:5...
39-
--> $DIR/type-alias-free-regions.rs:26:5
38+
note: first, the lifetime cannot outlive the anonymous lifetime defined on the method body at 26:23...
39+
--> $DIR/type-alias-free-regions.rs:26:23
4040
|
4141
LL | fn from_tuple(b: (B,)) -> Self {
42-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
42+
| ^
4343
note: ...so that the expression is assignable
4444
--> $DIR/type-alias-free-regions.rs:27:25
4545
|

src/test/ui/regions/regions-infer-paramd-indirect.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ LL | self.f = b;
66
|
77
= note: expected struct `Box<Box<&'a isize>>`
88
found struct `Box<Box<&isize>>`
9-
note: the anonymous lifetime #2 defined on the method body at 21:5...
10-
--> $DIR/regions-infer-paramd-indirect.rs:21:5
9+
note: the anonymous lifetime defined on the method body at 21:36...
10+
--> $DIR/regions-infer-paramd-indirect.rs:21:36
1111
|
1212
LL | fn set_f_bad(&mut self, b: Box<B>) {
13-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13+
| ^
1414
note: ...does not necessarily outlive the lifetime `'a` as defined on the impl at 16:6
1515
--> $DIR/regions-infer-paramd-indirect.rs:16:6
1616
|

src/test/ui/ufcs/ufcs-explicit-self-bad.stderr

+12-12
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ LL | fn dummy2(self: &Bar<T>) {}
3333
|
3434
= note: expected reference `&'a Bar<T>`
3535
found reference `&Bar<T>`
36-
note: the anonymous lifetime #1 defined on the method body at 37:5...
37-
--> $DIR/ufcs-explicit-self-bad.rs:37:5
36+
note: the anonymous lifetime defined on the method body at 37:21...
37+
--> $DIR/ufcs-explicit-self-bad.rs:37:21
3838
|
3939
LL | fn dummy2(self: &Bar<T>) {}
40-
| ^^^^^^^^^^^^^^^^^^^^^^^^
40+
| ^^^^^^^
4141
note: ...does not necessarily outlive the lifetime `'a` as defined on the impl at 35:6
4242
--> $DIR/ufcs-explicit-self-bad.rs:35:6
4343
|
@@ -57,11 +57,11 @@ note: the lifetime `'a` as defined on the impl at 35:6...
5757
|
5858
LL | impl<'a, T> SomeTrait for &'a Bar<T> {
5959
| ^^
60-
note: ...does not necessarily outlive the anonymous lifetime #1 defined on the method body at 37:5
61-
--> $DIR/ufcs-explicit-self-bad.rs:37:5
60+
note: ...does not necessarily outlive the anonymous lifetime defined on the method body at 37:21
61+
--> $DIR/ufcs-explicit-self-bad.rs:37:21
6262
|
6363
LL | fn dummy2(self: &Bar<T>) {}
64-
| ^^^^^^^^^^^^^^^^^^^^^^^^
64+
| ^^^^^^^
6565

6666
error[E0308]: mismatched `self` parameter type
6767
--> $DIR/ufcs-explicit-self-bad.rs:39:21
@@ -71,11 +71,11 @@ LL | fn dummy3(self: &&Bar<T>) {}
7171
|
7272
= note: expected reference `&'a Bar<T>`
7373
found reference `&Bar<T>`
74-
note: the anonymous lifetime #2 defined on the method body at 39:5...
75-
--> $DIR/ufcs-explicit-self-bad.rs:39:5
74+
note: the anonymous lifetime defined on the method body at 39:22...
75+
--> $DIR/ufcs-explicit-self-bad.rs:39:22
7676
|
7777
LL | fn dummy3(self: &&Bar<T>) {}
78-
| ^^^^^^^^^^^^^^^^^^^^^^^^^
78+
| ^^^^^^^
7979
note: ...does not necessarily outlive the lifetime `'a` as defined on the impl at 35:6
8080
--> $DIR/ufcs-explicit-self-bad.rs:35:6
8181
|
@@ -95,11 +95,11 @@ note: the lifetime `'a` as defined on the impl at 35:6...
9595
|
9696
LL | impl<'a, T> SomeTrait for &'a Bar<T> {
9797
| ^^
98-
note: ...does not necessarily outlive the anonymous lifetime #2 defined on the method body at 39:5
99-
--> $DIR/ufcs-explicit-self-bad.rs:39:5
98+
note: ...does not necessarily outlive the anonymous lifetime defined on the method body at 39:22
99+
--> $DIR/ufcs-explicit-self-bad.rs:39:22
100100
|
101101
LL | fn dummy3(self: &&Bar<T>) {}
102-
| ^^^^^^^^^^^^^^^^^^^^^^^^^
102+
| ^^^^^^^
103103

104104
error: aborting due to 7 previous errors
105105

0 commit comments

Comments
 (0)