Skip to content

Commit b01550a

Browse files
committed
Update tests
1 parent e27bae0 commit b01550a

File tree

217 files changed

+140
-2071
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

217 files changed

+140
-2071
lines changed

src/test/ui/associated-types/associated-types-project-from-hrtb-in-fn-body.nll.stderr

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
warning: not reporting region error due to nll
2-
--> $DIR/associated-types-project-from-hrtb-in-fn-body.rs:32:12
3-
|
4-
LL | let z: I::A = if cond { x } else { y };
5-
| ^^^^
6-
71
error: unsatisfied lifetime constraints
82
--> $DIR/associated-types-project-from-hrtb-in-fn-body.rs:32:29
93
|

src/test/ui/associated-types/cache/project-fn-ret-contravariant.krisskross.nll.stderr

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
warning: not reporting region error due to nll
2-
--> $DIR/project-fn-ret-contravariant.rs:53:16
3-
|
4-
LL | let a = bar(foo, y);
5-
| ^^^
6-
7-
warning: not reporting region error due to nll
8-
--> $DIR/project-fn-ret-contravariant.rs:54:16
9-
|
10-
LL | let b = bar(foo, x);
11-
| ^^^
12-
131
error: unsatisfied lifetime constraints
142
--> $DIR/project-fn-ret-contravariant.rs:53:12
153
|

src/test/ui/associated-types/cache/project-fn-ret-contravariant.transmute.nll.stderr

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
warning: not reporting region error due to nll
2-
--> $DIR/project-fn-ret-contravariant.rs:48:8
3-
|
4-
LL | bar(foo, x) //[transmute]~ ERROR E0495
5-
| ^^^
6-
71
error: unsatisfied lifetime constraints
82
--> $DIR/project-fn-ret-contravariant.rs:48:4
93
|

src/test/ui/associated-types/cache/project-fn-ret-invariant.krisskross.nll.stderr

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
warning: not reporting region error due to nll
2-
--> $DIR/project-fn-ret-invariant.rs:63:16
3-
|
4-
LL | let a = bar(foo, y); //[krisskross]~ ERROR E0623
5-
| ^^^
6-
7-
warning: not reporting region error due to nll
8-
--> $DIR/project-fn-ret-invariant.rs:64:16
9-
|
10-
LL | let b = bar(foo, x);
11-
| ^^^
12-
131
error: unsatisfied lifetime constraints
142
--> $DIR/project-fn-ret-invariant.rs:63:12
153
|

src/test/ui/associated-types/cache/project-fn-ret-invariant.oneuse.nll.stderr

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
warning: not reporting region error due to nll
2-
--> $DIR/project-fn-ret-invariant.rs:47:12
3-
|
4-
LL | let f = foo; // <-- No consistent type can be inferred for `f` here.
5-
| ^^^
6-
71
error: unsatisfied lifetime constraints
82
--> $DIR/project-fn-ret-invariant.rs:48:12
93
|

src/test/ui/associated-types/cache/project-fn-ret-invariant.transmute.nll.stderr

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
warning: not reporting region error due to nll
2-
--> $DIR/project-fn-ret-invariant.rs:58:8
3-
|
4-
LL | bar(foo, x) //[transmute]~ ERROR E0495
5-
| ^^^
6-
71
error: unsatisfied lifetime constraints
82
--> $DIR/project-fn-ret-invariant.rs:58:4
93
|

src/test/ui/borrowck/borrowck-reborrow-from-shorter-lived-andmut.nll.stderr

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
warning: not reporting region error due to nll
2-
--> $DIR/borrowck-reborrow-from-shorter-lived-andmut.rs:19:18
3-
|
4-
LL | S { pointer: &mut *p.pointer }
5-
| ^^^^^^^^^^^^^^^
6-
71
error: unsatisfied lifetime constraints
82
--> $DIR/borrowck-reborrow-from-shorter-lived-andmut.rs:19:5
93
|

src/test/ui/borrowck/issue-45983.nll.stderr

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
warning: not reporting region error due to nll
2-
--> $DIR/issue-45983.rs:36:27
3-
|
4-
LL | give_any(|y| x = Some(y));
5-
| ^
6-
71
error: borrowed data escapes outside of closure
82
--> $DIR/issue-45983.rs:36:18
93
|

src/test/ui/borrowck/issue-45983.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ fn main() {
3636
give_any(|y| x = Some(y));
3737
//[ast]~^ ERROR borrowed data cannot be stored outside of its closure
3838
//[migrate]~^^ ERROR borrowed data cannot be stored outside of its closure
39-
//[nll]~^^^ WARN not reporting region error due to nll
40-
//[nll]~| ERROR borrowed data escapes outside of closure
39+
//[nll]~^^^ ERROR borrowed data escapes outside of closure
4140
//[nll]~| ERROR cannot assign to `x`, as it is not declared as mutable
4241
}

src/test/ui/borrowck/issue-7573.nll.stderr

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
warning: not reporting region error due to nll
2-
--> $DIR/issue-7573.rs:27:31
3-
|
4-
LL | let mut lines_to_use: Vec<&CrateId> = Vec::new();
5-
| ^
6-
71
error: borrowed data escapes outside of closure
82
--> $DIR/issue-7573.rs:32:9
93
|

src/test/ui/borrowck/regions-escape-bound-fn-2.nll.stderr

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
warning: not reporting region error due to nll
2-
--> $DIR/regions-escape-bound-fn-2.rs:18:27
3-
|
4-
LL | with_int(|y| x = Some(y));
5-
| ^
6-
71
error: borrowed data escapes outside of closure
82
--> $DIR/regions-escape-bound-fn-2.rs:18:18
93
|

src/test/ui/borrowck/regions-escape-bound-fn.nll.stderr

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
warning: not reporting region error due to nll
2-
--> $DIR/regions-escape-bound-fn.rs:18:22
3-
|
4-
LL | with_int(|y| x = Some(y));
5-
| ^^^^^^^
6-
71
error: borrowed data escapes outside of closure
82
--> $DIR/regions-escape-bound-fn.rs:18:18
93
|

src/test/ui/borrowck/regions-escape-unboxed-closure.nll.stderr

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
warning: not reporting region error due to nll
2-
--> $DIR/regions-escape-unboxed-closure.rs:16:27
3-
|
4-
LL | with_int(&mut |y| x = Some(y));
5-
| ^^^^^^^
6-
71
error: borrowed data escapes outside of closure
82
--> $DIR/regions-escape-unboxed-closure.rs:16:23
93
|

src/test/ui/closure-expected-type/expect-fn-supply-fn.nll.stderr

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
warning: not reporting region error due to nll
2-
--> $DIR/expect-fn-supply-fn.rs:24:52
3-
|
4-
LL | with_closure_expecting_fn_with_free_region(|x: fn(&'x u32), y| {});
5-
| ^^^^^^^^^^^
6-
71
error[E0631]: type mismatch in closure arguments
82
--> $DIR/expect-fn-supply-fn.rs:40:5
93
|

src/test/ui/closures/closure-bounds-static-cant-capture-borrowed.nll.stderr

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
warning: not reporting region error due to nll
2-
--> $DIR/closure-bounds-static-cant-capture-borrowed.rs:15:9
3-
|
4-
LL | bar(|| {
5-
| _________^
6-
LL | | //~^ ERROR explicit lifetime required in the type of `x` [E0621]
7-
LL | | let _ = x;
8-
LL | | })
9-
| |_____^
10-
111
error[E0621]: explicit lifetime required in the type of `x`
122
--> $DIR/closure-bounds-static-cant-capture-borrowed.rs:15:5
133
|

src/test/ui/closures/closure-expected-type/expect-region-supply-region.nll.stderr

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,3 @@
1-
warning: not reporting region error due to nll
2-
--> $DIR/expect-region-supply-region.rs:28:13
3-
|
4-
LL | f = Some(x); //~ ERROR borrowed data cannot be stored outside of its closure
5-
| ^^^^^^^
6-
7-
warning: not reporting region error due to nll
8-
--> $DIR/expect-region-supply-region.rs:38:13
9-
|
10-
LL | f = Some(x); //~ ERROR borrowed data cannot be stored outside of its closure
11-
| ^^^^^^^
12-
13-
warning: not reporting region error due to nll
14-
--> $DIR/expect-region-supply-region.rs:47:33
15-
|
16-
LL | closure_expecting_bound(|x: &'x u32| {
17-
| ^^^^^^^
18-
19-
warning: not reporting region error due to nll
20-
--> $DIR/expect-region-supply-region.rs:52:13
21-
|
22-
LL | f = Some(x);
23-
| ^^^^^^^
24-
251
error: borrowed data escapes outside of closure
262
--> $DIR/expect-region-supply-region.rs:28:9
273
|

src/test/ui/error-codes/E0621-does-not-trigger-for-closures.nll.stderr

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
warning: not reporting region error due to nll
2-
--> $DIR/E0621-does-not-trigger-for-closures.rs:25:5
3-
|
4-
LL | invoke(&x, |a, b| if a > b { a } else { b }); //~ ERROR E0495
5-
| ^^^^^^
6-
71
error: unsatisfied lifetime constraints
82
--> $DIR/E0621-does-not-trigger-for-closures.rs:25:45
93
|

src/test/ui/existential_types/generic_type_does_not_live_long_enough.nll.stderr

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@ LL | let z: i32 = x; //~ ERROR mismatched types
77
= note: expected type `i32`
88
found type `WrongGeneric::<&{integer}>`
99

10-
warning: not reporting region error due to nll
11-
--> $DIR/generic_type_does_not_live_long_enough.rs:19:1
12-
|
13-
LL | existential type WrongGeneric<T>: 'static;
14-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15-
1610
error: aborting due to previous error
1711

1812
For more information about this error, try `rustc --explain E0308`.

src/test/ui/hr-subtype/hr-subtype.free_inv_x_vs_free_inv_y.nll.stderr

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,3 @@
1-
warning: not reporting region error due to nll
2-
--> $DIR/hr-subtype.rs:43:26
3-
|
4-
LL | gimme::<$t2>(None::<$t1>);
5-
| ^^^^^^^^^^^
6-
...
7-
LL | / check! { free_inv_x_vs_free_inv_y: (fn(Inv<'x>),
8-
LL | | fn(Inv<'y>)) }
9-
| |__________________________________________________- in this macro invocation
10-
11-
warning: not reporting region error due to nll
12-
--> $DIR/hr-subtype.rs:49:26
13-
|
14-
LL | gimme::<$t1>(None::<$t2>);
15-
| ^^^^^^^^^^^
16-
...
17-
LL | / check! { free_inv_x_vs_free_inv_y: (fn(Inv<'x>),
18-
LL | | fn(Inv<'y>)) }
19-
| |__________________________________________________- in this macro invocation
20-
211
error: unsatisfied lifetime constraints
222
--> $DIR/hr-subtype.rs:43:13
233
|

src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_y.nll.stderr

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
warning: not reporting region error due to nll
2-
--> $DIR/hr-subtype.rs:49:26
3-
|
4-
LL | gimme::<$t1>(None::<$t2>);
5-
| ^^^^^^^^^^^
6-
...
7-
LL | / check! { free_x_vs_free_y: (fn(&'x u32),
8-
LL | | fn(&'y u32)) }
9-
| |__________________________________________- in this macro invocation
10-
111
error: unsatisfied lifetime constraints
122
--> $DIR/hr-subtype.rs:49:13
133
|

src/test/ui/impl-header-lifetime-elision/dyn-trait.nll.stderr

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
warning: not reporting region error due to nll
2-
--> $DIR/dyn-trait.rs:32:16
3-
|
4-
LL | static_val(x); //~ ERROR cannot infer
5-
| ^
6-
71
error: borrowed data escapes outside of function
82
--> $DIR/dyn-trait.rs:32:5
93
|

src/test/ui/impl-trait/must_outlive_least_region_or_bound.nll.stderr

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,3 @@
1-
warning: not reporting region error due to nll
2-
--> $DIR/must_outlive_least_region_or_bound.rs:13:35
3-
|
4-
LL | fn elided(x: &i32) -> impl Copy { x }
5-
| ^
6-
7-
warning: not reporting region error due to nll
8-
--> $DIR/must_outlive_least_region_or_bound.rs:16:44
9-
|
10-
LL | fn explicit<'a>(x: &'a i32) -> impl Copy { x }
11-
| ^
12-
13-
warning: not reporting region error due to nll
14-
--> $DIR/must_outlive_least_region_or_bound.rs:22:69
15-
|
16-
LL | fn with_bound<'a>(x: &'a i32) -> impl LifetimeTrait<'a> + 'static { x }
17-
| ^
18-
19-
warning: not reporting region error due to nll
20-
--> $DIR/must_outlive_least_region_or_bound.rs:29:5
21-
|
22-
LL | move |_| println!("{}", y)
23-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
24-
25-
warning: not reporting region error due to nll
26-
--> $DIR/must_outlive_least_region_or_bound.rs:32:51
27-
|
28-
LL | fn ty_param_wont_outlive_static<T:Debug>(x: T) -> impl Debug + 'static {
29-
| ^^^^^^^^^^^^^^^^^^^^
30-
311
error[E0621]: explicit lifetime required in the type of `x`
322
--> $DIR/must_outlive_least_region_or_bound.rs:13:35
333
|

src/test/ui/impl-trait/static-return-lifetime-infered.nll.stderr

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
warning: not reporting region error due to nll
2-
--> $DIR/static-return-lifetime-infered.rs:17:16
3-
|
4-
LL | self.x.iter().map(|a| a.0)
5-
| ^^^^
6-
7-
warning: not reporting region error due to nll
8-
--> $DIR/static-return-lifetime-infered.rs:21:16
9-
|
10-
LL | self.x.iter().map(|a| a.0)
11-
| ^^^^
12-
131
error: unsatisfied lifetime constraints
142
--> $DIR/static-return-lifetime-infered.rs:17:9
153
|

src/test/ui/impl-trait/type_parameters_captured.nll.stderr

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
warning: not reporting region error due to nll
2-
--> $DIR/type_parameters_captured.rs:17:20
3-
|
4-
LL | fn foo<T>(x: T) -> impl Any + 'static {
5-
| ^^^^^^^^^^^^^^^^^^
6-
71
error[E0310]: the parameter type `T` may not live long enough
82
--> $DIR/type_parameters_captured.rs:19:5
93
|

src/test/ui/in-band-lifetimes/mismatched.nll.stderr

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
warning: not reporting region error due to nll
2-
--> $DIR/mismatched.rs:14:42
3-
|
4-
LL | fn foo(x: &'a u32, y: &u32) -> &'a u32 { y } //~ ERROR explicit lifetime required
5-
| ^
6-
7-
warning: not reporting region error due to nll
8-
--> $DIR/mismatched.rs:16:46
9-
|
10-
LL | fn foo2(x: &'a u32, y: &'b u32) -> &'a u32 { y } //~ ERROR lifetime mismatch
11-
| ^
12-
131
error[E0621]: explicit lifetime required in the type of `y`
142
--> $DIR/mismatched.rs:14:42
153
|

src/test/ui/in-band-lifetimes/mismatched_trait.nll.stderr

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/test/ui/issues/issue-10291.nll.stderr

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
warning: not reporting region error due to nll
2-
--> $DIR/issue-10291.rs:13:9
3-
|
4-
LL | x //~ ERROR E0312
5-
| ^
6-
71
error: unsatisfied lifetime constraints
82
--> $DIR/issue-10291.rs:12:5
93
|

src/test/ui/issues/issue-13058.nll.stderr

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
warning: not reporting region error due to nll
2-
--> $DIR/issue-13058.rs:24:21
3-
|
4-
LL | let cont_iter = cont.iter();
5-
| ^^^^
6-
7-
warning: not reporting region error due to nll
8-
--> $DIR/issue-13058.rs:24:26
9-
|
10-
LL | let cont_iter = cont.iter();
11-
| ^^^^
12-
131
error[E0308]: mismatched types
142
--> $DIR/issue-13058.rs:36:11
153
|

0 commit comments

Comments
 (0)