2018-10-11 18:33:08 -05:00
|
|
|
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);
|
2019-01-02 18:43:08 -06:00
|
|
|
| ----- - value moved here
|
|
|
|
| |
|
|
|
|
| move occurs because `s` has type `S<std::boxed::Box<u32>>`, which does not implement the `Copy` trait
|
2018-10-11 18:33:08 -05:00
|
|
|
LL | s.x = 10; s.y = Box::new(20);
|
|
|
|
| ^^^^^^^^ value partially assigned here after move
|
|
|
|
|
|
|
|
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);
|
2019-01-02 18:43:08 -06:00
|
|
|
| ----- - value moved here
|
|
|
|
| |
|
|
|
|
| move occurs because `t` has type `(u32, std::boxed::Box<u32>)`, which does not implement the `Copy` trait
|
2018-10-11 18:33:08 -05:00
|
|
|
LL | t.0 = 10; t.1 = Box::new(20);
|
|
|
|
| ^^^^^^^^ value partially assigned here after move
|
|
|
|
|
|
|
|
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);
|
2019-01-02 18:43:08 -06:00
|
|
|
| ----- - value moved here
|
|
|
|
| |
|
|
|
|
| move occurs because `s` has type `S<std::boxed::Box<u32>>`, which does not implement the `Copy` trait
|
2018-10-11 18:33:08 -05:00
|
|
|
LL | s.x = 10;
|
|
|
|
| ^^^^^^^^ value partially assigned here after move
|
|
|
|
|
|
|
|
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);
|
2019-01-02 18:43:08 -06:00
|
|
|
| ----- - value moved here
|
|
|
|
| |
|
|
|
|
| move occurs because `t` has type `(u32, std::boxed::Box<u32>)`, which does not implement the `Copy` trait
|
2018-10-11 18:33:08 -05:00
|
|
|
LL | t.0 = 10;
|
|
|
|
| ^^^^^^^^ value partially assigned here after move
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
2019-01-02 18:43:08 -06:00
|
|
|
LL | let mut c = (1, "".to_owned());
|
|
|
|
| ----- move occurs because `c` has type `(i32, std::string::String)`, which does not implement the `Copy` trait
|
|
|
|
LL | match c {
|
2018-10-11 18:33:08 -05:00
|
|
|
LL | c2 => {
|
|
|
|
| -- value moved here
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | c.0 = 2;
|
2018-10-11 18:33:08 -05:00
|
|
|
| ^^^^^^^ value partially assigned here after move
|
|
|
|
|
|
|
|
error[E0382]: assign to part of moved value: `c`
|
|
|
|
--> $DIR/issue-21232-partial-init-and-use.rs:269:13
|
|
|
|
|
|
2019-01-02 18:43:08 -06:00
|
|
|
LL | let mut c = (1, (1, "".to_owned()));
|
|
|
|
| ----- move occurs because `c` has type `(i32, (i32, std::string::String))`, which does not implement the `Copy` trait
|
|
|
|
LL | match c {
|
2018-10-11 18:33:08 -05:00
|
|
|
LL | c2 => {
|
|
|
|
| -- value moved here
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | (c.1).0 = 2;
|
2018-10-11 18:33:08 -05:00
|
|
|
| ^^^^^^^^^^^ value partially assigned here after move
|
|
|
|
|
|
|
|
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
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | ((c.1).1).0 = 3;
|
2018-10-11 18:33:08 -05:00
|
|
|
| ^^^^^^^^^^^^^^^ 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`.
|