Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 72e3e0e

Browse files
committed
Move some tests with compare-mode=nll output to revisions
1 parent 0677edc commit 72e3e0e

39 files changed

+147
-78
lines changed

src/test/ui/nll/issue-50716.stderr renamed to src/test/ui/nll/issue-50716.base.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error[E0308]: mismatched types
2-
--> $DIR/issue-50716.rs:14:9
2+
--> $DIR/issue-50716.rs:18:9
33
|
44
LL | let _x = *s;
55
| ^^ lifetime mismatch
66
|
77
= note: expected type `<<&'a T as A>::X as Sized>`
88
found type `<<&'static T as A>::X as Sized>`
99
note: the lifetime `'a` as defined here...
10-
--> $DIR/issue-50716.rs:9:8
10+
--> $DIR/issue-50716.rs:13:8
1111
|
1212
LL | fn foo<'a, T: 'static>(s: Box<<&'a T as A>::X>)
1313
| ^^

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: lifetime may not live long enough
2-
--> $DIR/issue-50716.rs:14:14
2+
--> $DIR/issue-50716.rs:18:14
33
|
44
LL | fn foo<'a, T: 'static>(s: Box<<&'a T as A>::X>)
55
| -- lifetime `'a` defined here

src/test/ui/nll/issue-50716.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
// Regression test for the issue #50716: NLL ignores lifetimes bounds
33
// derived from `Sized` requirements
44

5+
// revisions: base nll
6+
// ignore-compare-mode-nll
7+
//[nll] compile-flags: -Z borrowck=mir
8+
59
trait A {
610
type X: ?Sized;
711
}

src/test/ui/nll/issue-52742.stderr renamed to src/test/ui/nll/issue-52742.base.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
error[E0312]: lifetime of reference outlives lifetime of borrowed content...
2-
--> $DIR/issue-52742.rs:12:18
2+
--> $DIR/issue-52742.rs:17:18
33
|
44
LL | self.y = b.z
55
| ^^^
66
|
77
note: ...the reference is valid for the lifetime `'_` as defined here...
8-
--> $DIR/issue-52742.rs:10:10
8+
--> $DIR/issue-52742.rs:15:10
99
|
1010
LL | impl Foo<'_, '_> {
1111
| ^^
1212
note: ...but the borrowed content is only valid for the anonymous lifetime defined here
13-
--> $DIR/issue-52742.rs:11:31
13+
--> $DIR/issue-52742.rs:16:31
1414
|
1515
LL | fn take_bar(&mut self, b: Bar<'_>) {
1616
| ^^^^^^^

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: lifetime may not live long enough
2-
--> $DIR/issue-52742.rs:12:9
2+
--> $DIR/issue-52742.rs:17:9
33
|
44
LL | fn take_bar(&mut self, b: Bar<'_>) {
55
| --------- -- let's call this `'1`

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
// revisions: base nll
2+
// ignore-compare-mode-nll
3+
//[nll] compile-flags: -Z borrowck=mir
4+
5+
16
struct Foo<'a, 'b> {
27
x: &'a u32,
38
y: &'b u32,

src/test/ui/nll/issue-55394.stderr renamed to src/test/ui/nll/issue-55394.base.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'s` due to conflicting requirements
2-
--> $DIR/issue-55394.rs:9:9
2+
--> $DIR/issue-55394.rs:13:9
33
|
44
LL | Foo { bar }
55
| ^^^
66
|
77
note: first, the lifetime cannot outlive the anonymous lifetime defined here...
8-
--> $DIR/issue-55394.rs:8:17
8+
--> $DIR/issue-55394.rs:12:17
99
|
1010
LL | fn new(bar: &mut Bar) -> Self {
1111
| ^^^^^^^^
1212
note: ...so that reference does not outlive borrowed content
13-
--> $DIR/issue-55394.rs:9:15
13+
--> $DIR/issue-55394.rs:13:15
1414
|
1515
LL | Foo { bar }
1616
| ^^^
1717
note: but, the lifetime must be valid for the lifetime `'_` as defined here...
18-
--> $DIR/issue-55394.rs:7:10
18+
--> $DIR/issue-55394.rs:11:10
1919
|
2020
LL | impl Foo<'_> {
2121
| ^^
2222
note: ...so that the types are compatible
23-
--> $DIR/issue-55394.rs:9:9
23+
--> $DIR/issue-55394.rs:13:9
2424
|
2525
LL | Foo { bar }
2626
| ^^^^^^^^^^^

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: lifetime may not live long enough
2-
--> $DIR/issue-55394.rs:9:9
2+
--> $DIR/issue-55394.rs:13:9
33
|
44
LL | fn new(bar: &mut Bar) -> Self {
55
| - ---- return type is Foo<'2>

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// revisions: base nll
2+
// ignore-compare-mode-nll
3+
//[nll] compile-flags: -Z borrowck=mir
4+
15
struct Bar;
26

37
struct Foo<'s> {

src/test/ui/nll/issue-55401.stderr renamed to src/test/ui/nll/issue-55401.base.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
error[E0312]: lifetime of reference outlives lifetime of borrowed content...
2-
--> $DIR/issue-55401.rs:3:5
2+
--> $DIR/issue-55401.rs:7:5
33
|
44
LL | *y
55
| ^^
66
|
77
= note: ...the reference is valid for the static lifetime...
88
note: ...but the borrowed content is only valid for the lifetime `'a` as defined here
9-
--> $DIR/issue-55401.rs:1:47
9+
--> $DIR/issue-55401.rs:5:47
1010
|
1111
LL | fn static_to_a_to_static_through_ref_in_tuple<'a>(x: &'a u32) -> &'static u32 {
1212
| ^^

0 commit comments

Comments
 (0)