Skip to content

Commit

Permalink
Update new tests
Browse files Browse the repository at this point in the history
  • Loading branch information
varkor committed Jan 24, 2020
1 parent 24a2929 commit 4583283
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/test/ui/borrowck/issue-7573.nll.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error[E0521]: borrowed data escapes outside of closure
--> $DIR/issue-7573.rs:21:9
|
LL | let mut lines_to_use: Vec<&CrateId> = Vec::new();
| ---------------- `lines_to_use` is declared here, outside of the closure body
| ---------------- `lines_to_use` declared here, outside of the closure body
LL |
LL | let push_id = |installed_id: &CrateId| {
| ------------ `installed_id` is a reference that is only valid in the closure body
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/borrowck/regions-escape-bound-fn-2.nll.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error[E0521]: borrowed data escapes outside of closure
--> $DIR/regions-escape-bound-fn-2.rs:8:18
|
LL | let mut x = None;
| ----- `x` is declared here, outside of the closure body
| ----- `x` declared here, outside of the closure body
LL | with_int(|y| x = Some(y));
| - ^^^^^^^^^^^ `y` escapes the closure body here
| |
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/borrowck/regions-escape-bound-fn.nll.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error[E0521]: borrowed data escapes outside of closure
--> $DIR/regions-escape-bound-fn.rs:8:18
|
LL | let mut x: Option<&isize> = None;
| ----- `x` is declared here, outside of the closure body
| ----- `x` declared here, outside of the closure body
LL | with_int(|y| x = Some(y));
| - ^^^^^^^^^^^ `y` escapes the closure body here
| |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error[E0521]: borrowed data escapes outside of closure
--> $DIR/regions-escape-unboxed-closure.rs:6:23
|
LL | let mut x: Option<&isize> = None;
| ----- `x` is declared here, outside of the closure body
| ----- `x` declared here, outside of the closure body
LL | with_int(&mut |y| x = Some(y));
| - ^^^^^^^^^^^ `y` escapes the closure body here
| |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error[E0521]: borrowed data escapes outside of closure
--> $DIR/expect-region-supply-region.rs:18:9
|
LL | let mut f: Option<&u32> = None;
| ----- `f` is declared here, outside of the closure body
| ----- `f` declared here, outside of the closure body
LL | closure_expecting_bound(|x| {
| - `x` is a reference that is only valid in the closure body
LL | f = Some(x);
Expand All @@ -12,7 +12,7 @@ error[E0521]: borrowed data escapes outside of closure
--> $DIR/expect-region-supply-region.rs:28:9
|
LL | let mut f: Option<&u32> = None;
| ----- `f` is declared here, outside of the closure body
| ----- `f` declared here, outside of the closure body
LL | closure_expecting_bound(|x: &u32| {
| - `x` is a reference that is only valid in the closure body
LL | f = Some(x);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error[E0521]: borrowed data escapes outside of function
LL | fn caller2<'a,'b,F:Foo<'a>>(a: Inv<'a>, b: Inv<'b>, f: F) {
| - - `b` is a reference that is only valid in the function body
| |
| `a` is declared here, outside of the function body
| `a` declared here, outside of the function body
LL | // Here the value provided for 'y is 'b, and hence 'b:'a does not hold.
LL | f.method(b);
| ^^^^^^^^^^^ `b` escapes the function body here
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/regions/regions-nested-fns.nll.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error[E0521]: borrowed data escapes outside of closure
--> $DIR/regions-nested-fns.rs:10:9
|
LL | let mut ay = &y;
| ------ `ay` is declared here, outside of the closure body
| ------ `ay` declared here, outside of the closure body
LL |
LL | ignore::<Box<dyn for<'z> FnMut(&'z isize)>>(Box::new(|z| {
| - `z` is a reference that is only valid in the closure body
Expand Down

0 comments on commit 4583283

Please sign in to comment.