blob: aec7f676fcebd6688b2d912f52e398f5f416a1d6 [file] [log] [blame]
error[E0381]: assign to part of possibly uninitialized variable: `s`
--> $DIR/issue-21232-partial-init-and-use.rs:99:5
|
LL | s.x = 10; s.y = Box::new(20);
| ^^^^^^^^ use of possibly uninitialized `s`
error[E0381]: assign to part of possibly uninitialized variable: `t`
--> $DIR/issue-21232-partial-init-and-use.rs:106:5
|
LL | t.0 = 10; t.1 = Box::new(20);
| ^^^^^^^^ use of possibly uninitialized `t`
error[E0382]: assign to part of moved value: `s`
--> $DIR/issue-21232-partial-init-and-use.rs:113:5
|
LL | let mut s: S<B> = S::new(); drop(s);
| - value moved here
LL | s.x = 10; s.y = Box::new(20);
| ^^^^^^^^ value partially assigned here after move
|
= note: move occurs because `s` has type `S<std::boxed::Box<u32>>`, which does not implement the `Copy` trait
error[E0382]: assign to part of moved value: `t`
--> $DIR/issue-21232-partial-init-and-use.rs:120:5
|
LL | let mut t: T = (0, Box::new(0)); drop(t);
| - value moved here
LL | t.0 = 10; t.1 = Box::new(20);
| ^^^^^^^^ value partially assigned here after move
|
= note: move occurs because `t` has type `(u32, std::boxed::Box<u32>)`, which does not implement the `Copy` trait
error[E0381]: assign to part of possibly uninitialized variable: `s`
--> $DIR/issue-21232-partial-init-and-use.rs:127:5
|
LL | s.x = 10;
| ^^^^^^^^ use of possibly uninitialized `s`
error[E0381]: assign to part of possibly uninitialized variable: `t`
--> $DIR/issue-21232-partial-init-and-use.rs:134:5
|
LL | t.0 = 10;
| ^^^^^^^^ use of possibly uninitialized `t`
error[E0382]: assign to part of moved value: `s`
--> $DIR/issue-21232-partial-init-and-use.rs:141:5
|
LL | let mut s: S<B> = S::new(); drop(s);
| - value moved here
LL | s.x = 10;
| ^^^^^^^^ value partially assigned here after move
|
= note: move occurs because `s` has type `S<std::boxed::Box<u32>>`, which does not implement the `Copy` trait
error[E0382]: assign to part of moved value: `t`
--> $DIR/issue-21232-partial-init-and-use.rs:148:5
|
LL | let mut t: T = (0, Box::new(0)); drop(t);
| - value moved here
LL | t.0 = 10;
| ^^^^^^^^ value partially assigned here after move
|
= note: move occurs because `t` has type `(u32, std::boxed::Box<u32>)`, which does not implement the `Copy` trait
error[E0381]: assign to part of possibly uninitialized variable: `s`
--> $DIR/issue-21232-partial-init-and-use.rs:155:5
|
LL | s.x = 10;
| ^^^^^^^^ use of possibly uninitialized `s`
error[E0381]: assign to part of possibly uninitialized variable: `t`
--> $DIR/issue-21232-partial-init-and-use.rs:162:5
|
LL | t.0 = 10;
| ^^^^^^^^ use of possibly uninitialized `t`
error[E0381]: assign to part of possibly uninitialized variable: `q`
--> $DIR/issue-21232-partial-init-and-use.rs:178:5
|
LL | q.r.f.x = 10; q.r.f.y = Box::new(20);
| ^^^^^^^^^^^^ use of possibly uninitialized `q.r.f`
error[E0381]: assign to part of possibly uninitialized variable: `q`
--> $DIR/issue-21232-partial-init-and-use.rs:185:5
|
LL | q.r.f.0 = 10; q.r.f.1 = Box::new(20);
| ^^^^^^^^^^^^ use of possibly uninitialized `q.r.f`
error[E0382]: assign to part of moved value: `q.r`
--> $DIR/issue-21232-partial-init-and-use.rs:192:5
|
LL | let mut q: Q<S<B>> = Q::new(S::new()); drop(q.r);
| --- value moved here
LL | q.r.f.x = 10; q.r.f.y = Box::new(20);
| ^^^^^^^^^^^^ value partially assigned here after move
|
= note: move occurs because `q.r` has type `R<S<std::boxed::Box<u32>>>`, which does not implement the `Copy` trait
error[E0382]: assign to part of moved value: `q.r`
--> $DIR/issue-21232-partial-init-and-use.rs:199:5
|
LL | let mut q: Q<T> = Q::new((0, Box::new(0))); drop(q.r);
| --- value moved here
LL | q.r.f.0 = 10; q.r.f.1 = Box::new(20);
| ^^^^^^^^^^^^ value partially assigned here after move
|
= note: move occurs because `q.r` has type `R<(u32, std::boxed::Box<u32>)>`, which does not implement the `Copy` trait
error[E0381]: assign to part of possibly uninitialized variable: `q`
--> $DIR/issue-21232-partial-init-and-use.rs:206:5
|
LL | q.r.f.x = 10;
| ^^^^^^^^^^^^ use of possibly uninitialized `q.r.f`
error[E0381]: assign to part of possibly uninitialized variable: `q`
--> $DIR/issue-21232-partial-init-and-use.rs:213:5
|
LL | q.r.f.0 = 10;
| ^^^^^^^^^^^^ use of possibly uninitialized `q.r.f`
error[E0382]: assign to part of moved value: `q.r`
--> $DIR/issue-21232-partial-init-and-use.rs:220:5
|
LL | let mut q: Q<S<B>> = Q::new(S::new()); drop(q.r);
| --- value moved here
LL | q.r.f.x = 10;
| ^^^^^^^^^^^^ value partially assigned here after move
|
= note: move occurs because `q.r` has type `R<S<std::boxed::Box<u32>>>`, which does not implement the `Copy` trait
error[E0382]: assign to part of moved value: `q.r`
--> $DIR/issue-21232-partial-init-and-use.rs:227:5
|
LL | let mut q: Q<T> = Q::new((0, Box::new(0))); drop(q.r);
| --- value moved here
LL | q.r.f.0 = 10;
| ^^^^^^^^^^^^ value partially assigned here after move
|
= note: move occurs because `q.r` has type `R<(u32, std::boxed::Box<u32>)>`, which does not implement the `Copy` trait
error[E0381]: assign to part of possibly uninitialized variable: `q`
--> $DIR/issue-21232-partial-init-and-use.rs:234:5
|
LL | q.r.f.x = 10;
| ^^^^^^^^^^^^ use of possibly uninitialized `q.r.f`
error[E0381]: assign to part of possibly uninitialized variable: `q`
--> $DIR/issue-21232-partial-init-and-use.rs:241:5
|
LL | q.r.f.0 = 10;
| ^^^^^^^^^^^^ use of possibly uninitialized `q.r.f`
error[E0382]: assign to part of moved value: `c`
--> $DIR/issue-21232-partial-init-and-use.rs:259:13
|
LL | c2 => {
| -- value moved here
LL | c.0 = 2; //~ ERROR assign to part of moved value
| ^^^^^^^ value partially assigned here after move
|
= note: move occurs because `c` has type `(i32, std::string::String)`, which does not implement the `Copy` trait
error[E0382]: assign to part of moved value: `c`
--> $DIR/issue-21232-partial-init-and-use.rs:269:13
|
LL | c2 => {
| -- value moved here
LL | (c.1).0 = 2; //~ ERROR assign to part of moved value
| ^^^^^^^^^^^ value partially assigned here after move
|
= note: move occurs because `c` has type `(i32, (i32, std::string::String))`, which does not implement the `Copy` trait
error[E0382]: assign to part of moved value: `c.1`
--> $DIR/issue-21232-partial-init-and-use.rs:277:13
|
LL | c2 => {
| -- value moved here
LL | ((c.1).1).0 = 3; //~ ERROR assign to part of moved value
| ^^^^^^^^^^^^^^^ value partially assigned here after move
|
= note: move occurs because `c.1` has type `(i32, (i32, std::string::String))`, which does not implement the `Copy` trait
error: aborting due to 23 previous errors
Some errors occurred: E0381, E0382.
For more information about an error, try `rustc --explain E0381`.