Update new tests
This commit is contained in:
parent
24a2929ed1
commit
4583283908
7 changed files with 8 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
| |
|
||||
|
|
|
|||
|
|
@ -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
|
||||
| |
|
||||
|
|
|
|||
|
|
@ -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
|
||||
| |
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue