error output updated by ./x.py test --stage 1 src/test/ui --incremental --bless
This commit is contained in:
parent
a15916b245
commit
d4c52bfb17
@ -8,7 +8,7 @@ LL | asm!("nop" : : "r"(x));
|
||||
| - value moved here
|
||||
LL | }
|
||||
LL | let z = x; //[ast]~ ERROR use of moved value: `x`
|
||||
| ^ value used here after move
|
||||
| ^ value used here after partial move
|
||||
|
||||
error[E0503]: cannot use `x` because it was mutably borrowed
|
||||
--> $DIR/borrowck-asm.rs:35:32
|
||||
@ -71,7 +71,7 @@ LL | let x = &mut 2;
|
||||
| - move occurs because `x` has type `&mut i32`, which does not implement the `Copy` trait
|
||||
LL | unsafe {
|
||||
LL | asm!("nop" : : "r"(x), "r"(x) ); //[ast]~ ERROR use of moved value
|
||||
| - ^ value used here after move
|
||||
| - ^ value used here after partial move
|
||||
| |
|
||||
| value moved here
|
||||
|
||||
|
@ -367,7 +367,7 @@ error[E0382]: use of moved value: `x`
|
||||
LL | drop(x);
|
||||
| - value moved here
|
||||
LL | drop(x); //[ast]~ ERROR use of moved value: `x`
|
||||
| ^ value used here after move
|
||||
| ^ value used here after partial move
|
||||
|
|
||||
= note: move occurs because `x` has type `std::vec::Vec<i32>`, which does not implement the `Copy` trait
|
||||
|
||||
|
@ -8,7 +8,7 @@ LL | Some(_) if { drop(my_str); false } => {}
|
||||
| ------ value moved here
|
||||
LL | Some(_) => {}
|
||||
LL | None => { foo(my_str); } //~ ERROR [E0382]
|
||||
| ^^^^^^ value used here after move
|
||||
| ^^^^^^ value used here after partial move
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -6,7 +6,7 @@ LL | let mut src = &mut node;
|
||||
LL | {src};
|
||||
| --- value moved here
|
||||
LL | src.next = None; //~ ERROR use of moved value: `src` [E0382]
|
||||
| ^^^^^^^^ value used here after move
|
||||
| ^^^^^^^^ value used here after partial move
|
||||
|
||||
error[E0382]: use of moved value: `src`
|
||||
--> $DIR/borrowck-issue-48962.rs:22:5
|
||||
@ -16,7 +16,7 @@ LL | let mut src = &mut (22, 44);
|
||||
LL | {src};
|
||||
| --- value moved here
|
||||
LL | src.0 = 66; //~ ERROR use of moved value: `src` [E0382]
|
||||
| ^^^^^^^^^^ value used here after move
|
||||
| ^^^^^^^^^^ value used here after partial move
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
@ -11,7 +11,7 @@ LL | call_f(move|| { *t + 1 });
|
||||
LL | call_f(move|| { *t + 1 }); //[ast]~ ERROR capture of moved value
|
||||
| ^^^^^^ - use occurs due to use in closure
|
||||
| |
|
||||
| value used here after move
|
||||
| value used here after partial move
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -4,7 +4,7 @@ error[E0382]: use of moved value: `a[..]`
|
||||
LL | let [_, _x] = a;
|
||||
| -- value moved here
|
||||
LL | let [.., _y] = a; //[ast]~ ERROR [E0382]
|
||||
| ^^ value used here after move
|
||||
| ^^ value used here after partial move
|
||||
|
|
||||
= note: move occurs because `a[..]` has type `std::boxed::Box<i32>`, which does not implement the `Copy` trait
|
||||
|
||||
@ -14,7 +14,7 @@ error[E0382]: use of moved value: `a[..]`
|
||||
LL | let [_x, _] = a;
|
||||
| -- value moved here
|
||||
LL | let [_y..] = a; //[ast]~ ERROR [E0382]
|
||||
| ^^ value used here after move
|
||||
| ^^ value used here after partial move
|
||||
|
|
||||
= note: move occurs because `a[..]` has type `std::boxed::Box<i32>`, which does not implement the `Copy` trait
|
||||
|
||||
|
@ -17,7 +17,7 @@ LL | let mut x = Box::new(0);
|
||||
LL | drop(x);
|
||||
| - value moved here
|
||||
LL | let _ = (1,x); //~ ERROR use of moved value: `x` (Ast)
|
||||
| ^ value used here after move
|
||||
| ^ value used here after partial move
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
@ -6,7 +6,7 @@ LL | let mut t: Tuple = (S(0), 0);
|
||||
LL | drop(t);
|
||||
| - value moved here
|
||||
LL | t.0 = S(1);
|
||||
| ^^^^^^^^^^ value partially assigned here after move
|
||||
| ^^^^^^^^^^ value partially assigned here after partial move
|
||||
|
||||
error[E0382]: assign to part of moved value: `u`
|
||||
--> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:34:9
|
||||
@ -16,7 +16,7 @@ LL | let mut u: Tpair = Tpair(S(0), 0);
|
||||
LL | drop(u);
|
||||
| - value moved here
|
||||
LL | u.0 = S(1);
|
||||
| ^^^^^^^^^^ value partially assigned here after move
|
||||
| ^^^^^^^^^^ value partially assigned here after partial move
|
||||
|
||||
error[E0382]: assign to part of moved value: `v`
|
||||
--> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:45:9
|
||||
@ -26,7 +26,7 @@ LL | let mut v: Spair = Spair { x: S(0), y: 0 };
|
||||
LL | drop(v);
|
||||
| - value moved here
|
||||
LL | v.x = S(1);
|
||||
| ^^^^^^^^^^ value partially assigned here after move
|
||||
| ^^^^^^^^^^ value partially assigned here after partial move
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
@ -15,7 +15,7 @@ LL | let t: Tuple = (S(0), 0);
|
||||
LL | drop(t);
|
||||
| - value moved here
|
||||
LL | t.0 = S(1);
|
||||
| ^^^^^^^^^^ value partially assigned here after move
|
||||
| ^^^^^^^^^^ value partially assigned here after partial move
|
||||
|
||||
error[E0594]: cannot assign to `t.1`, as `t` is not declared as mutable
|
||||
--> $DIR/issue-54499-field-mutation-of-moved-out.rs:27:9
|
||||
@ -43,7 +43,7 @@ LL | let u: Tpair = Tpair(S(0), 0);
|
||||
LL | drop(u);
|
||||
| - value moved here
|
||||
LL | u.0 = S(1);
|
||||
| ^^^^^^^^^^ value partially assigned here after move
|
||||
| ^^^^^^^^^^ value partially assigned here after partial move
|
||||
|
||||
error[E0594]: cannot assign to `u.1`, as `u` is not declared as mutable
|
||||
--> $DIR/issue-54499-field-mutation-of-moved-out.rs:42:9
|
||||
@ -71,7 +71,7 @@ LL | let v: Spair = Spair { x: S(0), y: 0 };
|
||||
LL | drop(v);
|
||||
| - value moved here
|
||||
LL | v.x = S(1);
|
||||
| ^^^^^^^^^^ value partially assigned here after move
|
||||
| ^^^^^^^^^^ value partially assigned here after partial move
|
||||
|
||||
error[E0594]: cannot assign to `v.y`, as `v` is not declared as mutable
|
||||
--> $DIR/issue-54499-field-mutation-of-moved-out.rs:57:9
|
||||
|
@ -13,7 +13,7 @@ error[E0382]: use of moved value: `*f`
|
||||
LL | fn twice_ten_so<F: FnOnce(i32) -> i32>(f: Box<F>) {
|
||||
| - consider adding a `Copy` constraint to this type argument
|
||||
LL | f(f(10));
|
||||
| - ^ value used here after move
|
||||
| - ^ value used here after partial move
|
||||
| |
|
||||
| value moved here
|
||||
|
|
||||
@ -44,7 +44,7 @@ error[E0382]: use of moved value: `*f`
|
||||
--> $DIR/two-phase-nonrecv-autoref.rs:85:11
|
||||
|
|
||||
LL | f(f(10));
|
||||
| - ^ value used here after move
|
||||
| - ^ value used here after partial move
|
||||
| |
|
||||
| value moved here
|
||||
|
|
||||
|
@ -8,7 +8,7 @@ LL | 0 if { drop(s); false } => String::from("oops"),
|
||||
| - value moved here
|
||||
...
|
||||
LL | s
|
||||
| ^ value used here after move
|
||||
| ^ value used here after partial move
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -13,7 +13,7 @@ LL | x.zero()
|
||||
| - value moved here
|
||||
LL | };
|
||||
LL | x.zero()
|
||||
| ^ value used here after move
|
||||
| ^ value used here after partial move
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -14,7 +14,7 @@ error[E0382]: use of moved value: `x` (Mir)
|
||||
LL | fn dup(x: Box<isize>) -> Box<(Box<isize>,Box<isize>)> {
|
||||
| - move occurs because `x` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
|
||||
LL | box (x, x)
|
||||
| - ^ value used here after move
|
||||
| - ^ value used here after partial move
|
||||
| |
|
||||
| value moved here
|
||||
|
||||
|
@ -66,7 +66,7 @@ LL | let r = x;
|
||||
LL | || x.len(); //~ ERROR
|
||||
| ^^ - borrow occurs due to use in closure
|
||||
| |
|
||||
| value borrowed here after move
|
||||
| value borrowed here after partial move
|
||||
|
||||
error[E0382]: borrow of moved value: `x`
|
||||
--> $DIR/closure-access-spans.rs:42:5
|
||||
@ -78,7 +78,7 @@ LL | let r = x;
|
||||
LL | || x = String::new(); //~ ERROR
|
||||
| ^^ - borrow occurs due to use in closure
|
||||
| |
|
||||
| value borrowed here after move
|
||||
| value borrowed here after partial move
|
||||
|
||||
error[E0382]: borrow of moved value: `x`
|
||||
--> $DIR/closure-access-spans.rs:47:5
|
||||
@ -90,7 +90,7 @@ LL | let r = x;
|
||||
LL | || *x = String::new(); //~ ERROR
|
||||
| ^^ - borrow occurs due to use in closure
|
||||
| |
|
||||
| value borrowed here after move
|
||||
| value borrowed here after partial move
|
||||
|
||||
error[E0382]: use of moved value: `x`
|
||||
--> $DIR/closure-access-spans.rs:52:5
|
||||
@ -102,7 +102,7 @@ LL | let r = x;
|
||||
LL | || x; //~ ERROR
|
||||
| ^^ - use occurs due to use in closure
|
||||
| |
|
||||
| value used here after move
|
||||
| value used here after partial move
|
||||
|
||||
error: aborting due to 9 previous errors
|
||||
|
||||
|
@ -8,7 +8,7 @@ LL | || x;
|
||||
| |
|
||||
| value moved into closure here
|
||||
LL | let y = x; //~ ERROR
|
||||
| ^ value used here after move
|
||||
| ^ value used here after partial move
|
||||
|
||||
error[E0382]: borrow of moved value: `x`
|
||||
--> $DIR/closure-move-spans.rs:12:13
|
||||
@ -20,7 +20,7 @@ LL | || x;
|
||||
| |
|
||||
| value moved into closure here
|
||||
LL | let y = &x; //~ ERROR
|
||||
| ^^ value borrowed here after move
|
||||
| ^^ value borrowed here after partial move
|
||||
|
||||
error[E0382]: borrow of moved value: `x`
|
||||
--> $DIR/closure-move-spans.rs:17:13
|
||||
@ -32,7 +32,7 @@ LL | || x;
|
||||
| |
|
||||
| value moved into closure here
|
||||
LL | let y = &mut x; //~ ERROR
|
||||
| ^^^^^^ value borrowed here after move
|
||||
| ^^^^^^ value borrowed here after partial move
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
@ -5,7 +5,7 @@ LL | $wrapper.inner
|
||||
| -------------- value moved here
|
||||
...
|
||||
LL | wrapper.inner,
|
||||
| ^^^^^^^^^^^^^ value used here after move
|
||||
| ^^^^^^^^^^^^^ value used here after partial move
|
||||
|
|
||||
= note: move occurs because `wrapper.inner` has type `NonCopy`, which does not implement the `Copy` trait
|
||||
|
||||
|
@ -18,7 +18,7 @@ LL | let mut d = D { x: 0, s: S{ y: 0, z: 0 } };
|
||||
LL | drop(d);
|
||||
| - value moved here
|
||||
LL | d.x = 10;
|
||||
| ^^^^^^^^ value assigned here after move
|
||||
| ^^^^^^^^ value assigned here after partial move
|
||||
|
||||
error[E0381]: assign to part of possibly uninitialized variable: `d`
|
||||
--> $DIR/issue-21232-partial-init-and-erroneous-use.rs:49:5
|
||||
|
@ -18,7 +18,7 @@ LL | let mut s: S<B> = S::new(); drop(s);
|
||||
| |
|
||||
| move occurs because `s` has type `S<std::boxed::Box<u32>>`, which does not implement the `Copy` trait
|
||||
LL | s.x = 10; s.y = Box::new(20);
|
||||
| ^^^^^^^^ value partially assigned here after move
|
||||
| ^^^^^^^^ value partially assigned here after partial move
|
||||
|
||||
error[E0382]: assign to part of moved value: `t`
|
||||
--> $DIR/issue-21232-partial-init-and-use.rs:120:5
|
||||
@ -28,7 +28,7 @@ LL | let mut t: T = (0, Box::new(0)); drop(t);
|
||||
| |
|
||||
| move occurs because `t` has type `(u32, std::boxed::Box<u32>)`, which does not implement the `Copy` trait
|
||||
LL | t.0 = 10; t.1 = Box::new(20);
|
||||
| ^^^^^^^^ value partially assigned here after move
|
||||
| ^^^^^^^^ value partially assigned here after partial move
|
||||
|
||||
error[E0381]: assign to part of possibly uninitialized variable: `s`
|
||||
--> $DIR/issue-21232-partial-init-and-use.rs:127:5
|
||||
@ -50,7 +50,7 @@ LL | let mut s: S<B> = S::new(); drop(s);
|
||||
| |
|
||||
| move occurs because `s` has type `S<std::boxed::Box<u32>>`, which does not implement the `Copy` trait
|
||||
LL | s.x = 10;
|
||||
| ^^^^^^^^ value partially assigned here after move
|
||||
| ^^^^^^^^ value partially assigned here after partial move
|
||||
|
||||
error[E0382]: assign to part of moved value: `t`
|
||||
--> $DIR/issue-21232-partial-init-and-use.rs:148:5
|
||||
@ -60,7 +60,7 @@ LL | let mut t: T = (0, Box::new(0)); drop(t);
|
||||
| |
|
||||
| move occurs because `t` has type `(u32, std::boxed::Box<u32>)`, which does not implement the `Copy` trait
|
||||
LL | t.0 = 10;
|
||||
| ^^^^^^^^ value partially assigned here after move
|
||||
| ^^^^^^^^ value partially assigned here after partial move
|
||||
|
||||
error[E0381]: assign to part of possibly uninitialized variable: `s`
|
||||
--> $DIR/issue-21232-partial-init-and-use.rs:155:5
|
||||
@ -159,7 +159,7 @@ LL | match c {
|
||||
LL | c2 => {
|
||||
| -- value moved here
|
||||
LL | c.0 = 2; //~ ERROR assign to part of moved value
|
||||
| ^^^^^^^ value partially assigned here after move
|
||||
| ^^^^^^^ value partially assigned here after partial move
|
||||
|
||||
error[E0382]: assign to part of moved value: `c`
|
||||
--> $DIR/issue-21232-partial-init-and-use.rs:269:13
|
||||
|
@ -4,7 +4,7 @@ error[E0382]: use of moved value: `x`
|
||||
LL | drop(x.0);
|
||||
| --- value moved here
|
||||
LL | drop(x); //~ ERROR use of moved value
|
||||
| ^ value used here after move
|
||||
| ^ value used here after partial move
|
||||
|
|
||||
= note: move occurs because `x.0` has type `std::vec::Vec<i32>`, which does not implement the `Copy` trait
|
||||
|
||||
|
@ -32,7 +32,7 @@ LL | Err(k) ?;
|
||||
| - value moved here
|
||||
...
|
||||
LL | ::std::mem::drop(k); //~ ERROR use of moved value: `k`
|
||||
| ^ value used here after move
|
||||
| ^ value used here after partial move
|
||||
|
||||
error[E0506]: cannot assign to `i` because it is borrowed
|
||||
--> $DIR/try-block-bad-lifetime.rs:32:9
|
||||
|
@ -20,7 +20,7 @@ LL | ::std::mem::drop(x);
|
||||
| - value moved here
|
||||
LL | };
|
||||
LL | println!("{}", x); //~ ERROR borrow of moved value: `x`
|
||||
| ^ value borrowed here after move
|
||||
| ^ value borrowed here after partial move
|
||||
|
||||
error[E0506]: cannot assign to `i` because it is borrowed
|
||||
--> $DIR/try-block-maybe-bad-lifetime.rs:40:9
|
||||
|
Loading…
x
Reference in New Issue
Block a user