Skip to content

Commit 86e7b5c

Browse files
committed
use -Znll -Zborrowck=mir -Zverbose consistently
1 parent 75cf482 commit 86e7b5c

6 files changed

+9
-28
lines changed

src/test/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,12 @@
1313
// a variety of errors from the older, AST-based machinery (notably
1414
// borrowck), and then we get the NLL error at the end.
1515

16-
// compile-flags:-Znll
16+
// compile-flags:-Znll -Zborrowck=mir -Zverbose
1717

1818
fn foo(x: &u32) -> &'static u32 {
1919
&*x
2020
//~^ WARN not reporting region error due to -Znll
21-
//~| ERROR `*x` does not live long enough
22-
//~| ERROR free region `'_#1r` does not outlive free region `'static`
21+
//~| ERROR free region `'_#1r` does not outlive free region `ReStatic`
2322
}
2423

2524
fn main() { }

src/test/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.stderr

+2-20
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,11 @@ warning: not reporting region error due to -Znll
44
19 | &*x
55
| ^^^
66

7-
error[E0597]: `*x` does not live long enough
8-
--> $DIR/region-lbr-anon-does-not-outlive-static.rs:19:6
9-
|
10-
19 | &*x
11-
| ^^ does not live long enough
12-
|
13-
= note: borrowed value must be valid for the static lifetime...
14-
note: ...but borrowed value is only valid for the anonymous lifetime #1 defined on the function body at 18:1
15-
--> $DIR/region-lbr-anon-does-not-outlive-static.rs:18:1
16-
|
17-
18 | / fn foo(x: &u32) -> &'static u32 {
18-
19 | | &*x
19-
20 | | //~^ WARN not reporting region error due to -Znll
20-
21 | | //~| ERROR `*x` does not live long enough
21-
22 | | //~| ERROR free region `'_#1r` does not outlive free region `'static`
22-
23 | | }
23-
| |_^
24-
25-
error: free region `'_#1r` does not outlive free region `'static`
7+
error: free region `'_#1r` does not outlive free region `ReStatic`
268
--> $DIR/region-lbr-anon-does-not-outlive-static.rs:19:5
279
|
2810
19 | &*x
2911
| ^^^
3012

31-
error: aborting due to 2 previous errors
13+
error: aborting due to previous error
3214

src/test/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
// a variety of errors from the older, AST-based machinery (notably
1414
// borrowck), and then we get the NLL error at the end.
1515

16-
// compile-flags:-Znll -Zborrowck=mir
16+
// compile-flags:-Znll -Zborrowck=mir -Zverbose
1717

1818
fn foo<'a>(x: &'a u32) -> &'static u32 {
1919
&*x
2020
//~^ WARN not reporting region error due to -Znll
21-
//~| ERROR free region `'_#1r` does not outlive free region `'static`
21+
//~| ERROR free region `'_#1r` does not outlive free region `ReStatic`
2222
}
2323

2424
fn main() { }

src/test/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ warning: not reporting region error due to -Znll
44
19 | &*x
55
| ^^^
66

7-
error: free region `'_#1r` does not outlive free region `'static`
7+
error: free region `'_#1r` does not outlive free region `ReStatic`
88
--> $DIR/region-lbr-named-does-not-outlive-static.rs:19:5
99
|
1010
19 | &*x

src/test/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// a variety of errors from the older, AST-based machinery (notably
1414
// borrowck), and then we get the NLL error at the end.
1515

16-
// compile-flags:-Znll -Zborrowck=mir
16+
// compile-flags:-Znll -Zborrowck=mir -Zverbose
1717

1818
fn foo<'a, 'b>(x: &'a u32, y: &'b u32) -> &'b u32 {
1919
&*x

src/test/ui/nll/closure-requirements/region-lbr1-does-outlive-lbr2-because-implied-bound.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// Basic test for free regions in the NLL code. This test does not
1212
// report an error because of the (implied) bound that `'b: 'a`.
1313

14-
// compile-flags:-Znll
14+
// compile-flags:-Znll -Zborrowck=mir -Zverbose
1515
// must-compile-successfully
1616

1717
#![allow(warnings)]

0 commit comments

Comments
 (0)