2022-06-21 17:54:17 -05:00
|
|
|
error[E0381]: partially assigned binding `s` isn't fully initialized
|
2019-09-06 09:23:00 -05:00
|
|
|
--> $DIR/issue-21232-partial-init-and-use.rs:97:5
|
2018-10-11 18:33:08 -05:00
|
|
|
|
|
2022-06-21 13:57:45 -05:00
|
|
|
LL | let s: S<B>;
|
2022-06-21 17:54:17 -05:00
|
|
|
| - binding declared here but left uninitialized
|
2018-10-11 18:33:08 -05:00
|
|
|
LL | s.x = 10; s.y = Box::new(20);
|
2022-06-21 13:57:45 -05:00
|
|
|
| ^^^^^^^^ `s` partially assigned here but it isn't fully initialized
|
|
|
|
|
|
2022-06-21 17:54:17 -05:00
|
|
|
= help: partial initialization isn't supported, fully initialize the binding with a default value and mutate it, or use `std::mem::MaybeUninit`
|
2018-10-11 18:33:08 -05:00
|
|
|
|
2022-06-21 17:54:17 -05:00
|
|
|
error[E0381]: partially assigned binding `t` isn't fully initialized
|
2022-06-21 13:57:45 -05:00
|
|
|
--> $DIR/issue-21232-partial-init-and-use.rs:103:5
|
2018-10-11 18:33:08 -05:00
|
|
|
|
|
2022-06-21 13:57:45 -05:00
|
|
|
LL | let t: T;
|
2022-06-21 17:54:17 -05:00
|
|
|
| - binding declared here but left uninitialized
|
2018-10-11 18:33:08 -05:00
|
|
|
LL | t.0 = 10; t.1 = Box::new(20);
|
2022-06-21 13:57:45 -05:00
|
|
|
| ^^^^^^^^ `t` partially assigned here but it isn't fully initialized
|
|
|
|
|
|
2022-06-21 17:54:17 -05:00
|
|
|
= help: partial initialization isn't supported, fully initialize the binding with a default value and mutate it, or use `std::mem::MaybeUninit`
|
2018-10-11 18:33:08 -05:00
|
|
|
|
|
|
|
error[E0382]: assign to part of moved value: `s`
|
2022-06-21 13:57:45 -05:00
|
|
|
--> $DIR/issue-21232-partial-init-and-use.rs:109:5
|
2018-10-11 18:33:08 -05:00
|
|
|
|
|
|
|
|
LL | let mut s: S<B> = S::new(); drop(s);
|
2019-01-02 18:43:08 -06:00
|
|
|
| ----- - value moved here
|
|
|
|
| |
|
2020-09-02 02:40:56 -05:00
|
|
|
| move occurs because `s` has type `S<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`
|
2022-06-21 13:57:45 -05:00
|
|
|
--> $DIR/issue-21232-partial-init-and-use.rs:116:5
|
2018-10-11 18:33:08 -05:00
|
|
|
|
|
|
|
|
LL | let mut t: T = (0, Box::new(0)); drop(t);
|
2019-01-02 18:43:08 -06:00
|
|
|
| ----- - value moved here
|
|
|
|
| |
|
2020-09-02 02:40:56 -05:00
|
|
|
| move occurs because `t` has type `(u32, 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
|
2022-11-02 23:22:24 -05:00
|
|
|
|
|
|
|
|
help: consider cloning the value if the performance cost is acceptable
|
|
|
|
|
|
|
|
|
LL | let mut t: T = (0, Box::new(0)); drop(t.clone());
|
|
|
|
| ++++++++
|
2018-10-11 18:33:08 -05:00
|
|
|
|
2022-06-21 17:54:17 -05:00
|
|
|
error[E0381]: partially assigned binding `s` isn't fully initialized
|
2022-06-21 13:57:45 -05:00
|
|
|
--> $DIR/issue-21232-partial-init-and-use.rs:123:5
|
2018-10-11 18:33:08 -05:00
|
|
|
|
|
2022-06-21 13:57:45 -05:00
|
|
|
LL | let s: S<B>;
|
2022-06-21 17:54:17 -05:00
|
|
|
| - binding declared here but left uninitialized
|
2018-10-11 18:33:08 -05:00
|
|
|
LL | s.x = 10;
|
2022-06-21 13:57:45 -05:00
|
|
|
| ^^^^^^^^ `s` partially assigned here but it isn't fully initialized
|
|
|
|
|
|
2022-06-21 17:54:17 -05:00
|
|
|
= help: partial initialization isn't supported, fully initialize the binding with a default value and mutate it, or use `std::mem::MaybeUninit`
|
2018-10-11 18:33:08 -05:00
|
|
|
|
2022-06-21 17:54:17 -05:00
|
|
|
error[E0381]: partially assigned binding `t` isn't fully initialized
|
2022-06-21 13:57:45 -05:00
|
|
|
--> $DIR/issue-21232-partial-init-and-use.rs:129:5
|
2018-10-11 18:33:08 -05:00
|
|
|
|
|
2022-06-21 13:57:45 -05:00
|
|
|
LL | let t: T;
|
2022-06-21 17:54:17 -05:00
|
|
|
| - binding declared here but left uninitialized
|
2018-10-11 18:33:08 -05:00
|
|
|
LL | t.0 = 10;
|
2022-06-21 13:57:45 -05:00
|
|
|
| ^^^^^^^^ `t` partially assigned here but it isn't fully initialized
|
|
|
|
|
|
2022-06-21 17:54:17 -05:00
|
|
|
= help: partial initialization isn't supported, fully initialize the binding with a default value and mutate it, or use `std::mem::MaybeUninit`
|
2018-10-11 18:33:08 -05:00
|
|
|
|
|
|
|
error[E0382]: assign to part of moved value: `s`
|
2022-06-21 13:57:45 -05:00
|
|
|
--> $DIR/issue-21232-partial-init-and-use.rs:135:5
|
2018-10-11 18:33:08 -05:00
|
|
|
|
|
|
|
|
LL | let mut s: S<B> = S::new(); drop(s);
|
2019-01-02 18:43:08 -06:00
|
|
|
| ----- - value moved here
|
|
|
|
| |
|
2020-09-02 02:40:56 -05:00
|
|
|
| move occurs because `s` has type `S<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`
|
2022-06-21 13:57:45 -05:00
|
|
|
--> $DIR/issue-21232-partial-init-and-use.rs:142:5
|
2018-10-11 18:33:08 -05:00
|
|
|
|
|
|
|
|
LL | let mut t: T = (0, Box::new(0)); drop(t);
|
2019-01-02 18:43:08 -06:00
|
|
|
| ----- - value moved here
|
|
|
|
| |
|
2020-09-02 02:40:56 -05:00
|
|
|
| move occurs because `t` has type `(u32, 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
|
2022-11-02 23:22:24 -05:00
|
|
|
|
|
|
|
|
help: consider cloning the value if the performance cost is acceptable
|
|
|
|
|
|
|
|
|
LL | let mut t: T = (0, Box::new(0)); drop(t.clone());
|
|
|
|
| ++++++++
|
2018-10-11 18:33:08 -05:00
|
|
|
|
2022-06-21 17:54:17 -05:00
|
|
|
error[E0381]: partially assigned binding `s` isn't fully initialized
|
2022-06-21 13:57:45 -05:00
|
|
|
--> $DIR/issue-21232-partial-init-and-use.rs:149:5
|
2018-10-11 18:33:08 -05:00
|
|
|
|
|
2022-06-21 13:57:45 -05:00
|
|
|
LL | let s: S<Void>;
|
2022-06-21 17:54:17 -05:00
|
|
|
| - binding declared here but left uninitialized
|
2018-10-11 18:33:08 -05:00
|
|
|
LL | s.x = 10;
|
2022-06-21 13:57:45 -05:00
|
|
|
| ^^^^^^^^ `s` partially assigned here but it isn't fully initialized
|
|
|
|
|
|
2022-06-21 17:54:17 -05:00
|
|
|
= help: partial initialization isn't supported, fully initialize the binding with a default value and mutate it, or use `std::mem::MaybeUninit`
|
2018-10-11 18:33:08 -05:00
|
|
|
|
2022-06-21 17:54:17 -05:00
|
|
|
error[E0381]: partially assigned binding `t` isn't fully initialized
|
2022-06-21 13:57:45 -05:00
|
|
|
--> $DIR/issue-21232-partial-init-and-use.rs:155:5
|
2018-10-11 18:33:08 -05:00
|
|
|
|
|
2022-06-21 13:57:45 -05:00
|
|
|
LL | let t: Tvoid;
|
2022-06-21 17:54:17 -05:00
|
|
|
| - binding declared here but left uninitialized
|
2018-10-11 18:33:08 -05:00
|
|
|
LL | t.0 = 10;
|
2022-06-21 13:57:45 -05:00
|
|
|
| ^^^^^^^^ `t` partially assigned here but it isn't fully initialized
|
|
|
|
|
|
2022-06-21 17:54:17 -05:00
|
|
|
= help: partial initialization isn't supported, fully initialize the binding with a default value and mutate it, or use `std::mem::MaybeUninit`
|
2018-10-11 18:33:08 -05:00
|
|
|
|
2022-06-23 12:42:17 -05:00
|
|
|
error[E0381]: partially assigned binding `q` isn't fully initialized
|
2022-06-21 13:57:45 -05:00
|
|
|
--> $DIR/issue-21232-partial-init-and-use.rs:170:5
|
2018-10-11 18:33:08 -05:00
|
|
|
|
|
2022-06-21 13:57:45 -05:00
|
|
|
LL | let q: Q<S<B>>;
|
2022-06-21 17:54:17 -05:00
|
|
|
| - binding declared here but left uninitialized
|
2018-10-11 18:33:08 -05:00
|
|
|
LL | q.r.f.x = 10; q.r.f.y = Box::new(20);
|
2022-06-21 13:57:45 -05:00
|
|
|
| ^^^^^^^^^^^^ `q.r.f` partially assigned here but it isn't fully initialized
|
|
|
|
|
|
2022-06-21 17:54:17 -05:00
|
|
|
= help: partial initialization isn't supported, fully initialize the binding with a default value and mutate it, or use `std::mem::MaybeUninit`
|
2018-10-11 18:33:08 -05:00
|
|
|
|
2022-06-23 12:42:17 -05:00
|
|
|
error[E0381]: partially assigned binding `q` isn't fully initialized
|
2022-06-21 13:57:45 -05:00
|
|
|
--> $DIR/issue-21232-partial-init-and-use.rs:176:5
|
2018-10-11 18:33:08 -05:00
|
|
|
|
|
2022-06-21 13:57:45 -05:00
|
|
|
LL | let q: Q<T>;
|
2022-06-21 17:54:17 -05:00
|
|
|
| - binding declared here but left uninitialized
|
2018-10-11 18:33:08 -05:00
|
|
|
LL | q.r.f.0 = 10; q.r.f.1 = Box::new(20);
|
2022-06-21 13:57:45 -05:00
|
|
|
| ^^^^^^^^^^^^ `q.r.f` partially assigned here but it isn't fully initialized
|
|
|
|
|
|
2022-06-21 17:54:17 -05:00
|
|
|
= help: partial initialization isn't supported, fully initialize the binding with a default value and mutate it, or use `std::mem::MaybeUninit`
|
2018-10-11 18:33:08 -05:00
|
|
|
|
|
|
|
error[E0382]: assign to part of moved value: `q.r`
|
2022-06-21 13:57:45 -05:00
|
|
|
--> $DIR/issue-21232-partial-init-and-use.rs:182:5
|
2018-10-11 18:33:08 -05:00
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
= note: move occurs because `q.r` has type `R<S<Box<u32>>>`, which does not implement the `Copy` trait
|
2018-10-11 18:33:08 -05:00
|
|
|
|
|
|
|
error[E0382]: assign to part of moved value: `q.r`
|
2022-06-21 13:57:45 -05:00
|
|
|
--> $DIR/issue-21232-partial-init-and-use.rs:189:5
|
2018-10-11 18:33:08 -05:00
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
= note: move occurs because `q.r` has type `R<(u32, Box<u32>)>`, which does not implement the `Copy` trait
|
2018-10-11 18:33:08 -05:00
|
|
|
|
2022-06-23 12:42:17 -05:00
|
|
|
error[E0381]: partially assigned binding `q` isn't fully initialized
|
2022-06-21 13:57:45 -05:00
|
|
|
--> $DIR/issue-21232-partial-init-and-use.rs:196:5
|
2018-10-11 18:33:08 -05:00
|
|
|
|
|
2022-06-21 13:57:45 -05:00
|
|
|
LL | let q: Q<S<B>>;
|
2022-06-21 17:54:17 -05:00
|
|
|
| - binding declared here but left uninitialized
|
2018-10-11 18:33:08 -05:00
|
|
|
LL | q.r.f.x = 10;
|
2022-06-21 13:57:45 -05:00
|
|
|
| ^^^^^^^^^^^^ `q.r.f` partially assigned here but it isn't fully initialized
|
|
|
|
|
|
2022-06-21 17:54:17 -05:00
|
|
|
= help: partial initialization isn't supported, fully initialize the binding with a default value and mutate it, or use `std::mem::MaybeUninit`
|
2018-10-11 18:33:08 -05:00
|
|
|
|
2022-06-23 12:42:17 -05:00
|
|
|
error[E0381]: partially assigned binding `q` isn't fully initialized
|
2022-06-21 13:57:45 -05:00
|
|
|
--> $DIR/issue-21232-partial-init-and-use.rs:202:5
|
2018-10-11 18:33:08 -05:00
|
|
|
|
|
2022-06-21 13:57:45 -05:00
|
|
|
LL | let q: Q<T>;
|
2022-06-21 17:54:17 -05:00
|
|
|
| - binding declared here but left uninitialized
|
2018-10-11 18:33:08 -05:00
|
|
|
LL | q.r.f.0 = 10;
|
2022-06-21 13:57:45 -05:00
|
|
|
| ^^^^^^^^^^^^ `q.r.f` partially assigned here but it isn't fully initialized
|
|
|
|
|
|
2022-06-21 17:54:17 -05:00
|
|
|
= help: partial initialization isn't supported, fully initialize the binding with a default value and mutate it, or use `std::mem::MaybeUninit`
|
2018-10-11 18:33:08 -05:00
|
|
|
|
|
|
|
error[E0382]: assign to part of moved value: `q.r`
|
2022-06-21 13:57:45 -05:00
|
|
|
--> $DIR/issue-21232-partial-init-and-use.rs:208:5
|
2018-10-11 18:33:08 -05:00
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
= note: move occurs because `q.r` has type `R<S<Box<u32>>>`, which does not implement the `Copy` trait
|
2018-10-11 18:33:08 -05:00
|
|
|
|
|
|
|
error[E0382]: assign to part of moved value: `q.r`
|
2022-06-21 13:57:45 -05:00
|
|
|
--> $DIR/issue-21232-partial-init-and-use.rs:215:5
|
2018-10-11 18:33:08 -05:00
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
= note: move occurs because `q.r` has type `R<(u32, Box<u32>)>`, which does not implement the `Copy` trait
|
2018-10-11 18:33:08 -05:00
|
|
|
|
2022-06-23 12:42:17 -05:00
|
|
|
error[E0381]: partially assigned binding `q` isn't fully initialized
|
2022-06-21 13:57:45 -05:00
|
|
|
--> $DIR/issue-21232-partial-init-and-use.rs:222:5
|
2018-10-11 18:33:08 -05:00
|
|
|
|
|
2022-06-21 13:57:45 -05:00
|
|
|
LL | let mut q: Q<S<Void>>;
|
2022-06-21 17:54:17 -05:00
|
|
|
| ----- binding declared here but left uninitialized
|
2018-10-11 18:33:08 -05:00
|
|
|
LL | q.r.f.x = 10;
|
2022-06-21 13:57:45 -05:00
|
|
|
| ^^^^^^^^^^^^ `q.r.f` partially assigned here but it isn't fully initialized
|
|
|
|
|
|
2022-06-21 17:54:17 -05:00
|
|
|
= help: partial initialization isn't supported, fully initialize the binding with a default value and mutate it, or use `std::mem::MaybeUninit`
|
2018-10-11 18:33:08 -05:00
|
|
|
|
2022-06-23 12:42:17 -05:00
|
|
|
error[E0381]: partially assigned binding `q` isn't fully initialized
|
2022-06-21 13:57:45 -05:00
|
|
|
--> $DIR/issue-21232-partial-init-and-use.rs:228:5
|
2018-10-11 18:33:08 -05:00
|
|
|
|
|
2022-06-21 13:57:45 -05:00
|
|
|
LL | let mut q: Q<Tvoid>;
|
2022-06-21 17:54:17 -05:00
|
|
|
| ----- binding declared here but left uninitialized
|
2018-10-11 18:33:08 -05:00
|
|
|
LL | q.r.f.0 = 10;
|
2022-06-21 13:57:45 -05:00
|
|
|
| ^^^^^^^^^^^^ `q.r.f` partially assigned here but it isn't fully initialized
|
|
|
|
|
|
2022-06-21 17:54:17 -05:00
|
|
|
= help: partial initialization isn't supported, fully initialize the binding with a default value and mutate it, or use `std::mem::MaybeUninit`
|
2018-10-11 18:33:08 -05:00
|
|
|
|
|
|
|
error[E0382]: assign to part of moved value: `c`
|
2022-06-21 13:57:45 -05:00
|
|
|
--> $DIR/issue-21232-partial-init-and-use.rs:245:13
|
2018-10-11 18:33:08 -05:00
|
|
|
|
|
2019-01-02 18:43:08 -06:00
|
|
|
LL | let mut c = (1, "".to_owned());
|
2020-09-02 02:40:56 -05:00
|
|
|
| ----- move occurs because `c` has type `(i32, String)`, which does not implement the `Copy` trait
|
2019-01-02 18:43:08 -06:00
|
|
|
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
|
2022-11-02 23:22:24 -05:00
|
|
|
|
|
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | ref c2 => {
|
|
|
|
| +++
|
2018-10-11 18:33:08 -05:00
|
|
|
|
|
|
|
error[E0382]: assign to part of moved value: `c`
|
2022-06-21 13:57:45 -05:00
|
|
|
--> $DIR/issue-21232-partial-init-and-use.rs:255:13
|
2018-10-11 18:33:08 -05:00
|
|
|
|
|
2019-01-02 18:43:08 -06:00
|
|
|
LL | let mut c = (1, (1, "".to_owned()));
|
2020-09-02 02:40:56 -05:00
|
|
|
| ----- move occurs because `c` has type `(i32, (i32, String))`, which does not implement the `Copy` trait
|
2019-01-02 18:43:08 -06:00
|
|
|
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
|
2022-11-02 23:22:24 -05:00
|
|
|
|
|
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | ref c2 => {
|
|
|
|
| +++
|
2018-10-11 18:33:08 -05:00
|
|
|
|
|
|
|
error[E0382]: assign to part of moved value: `c.1`
|
2022-06-21 13:57:45 -05:00
|
|
|
--> $DIR/issue-21232-partial-init-and-use.rs:263:13
|
2018-10-11 18:33:08 -05:00
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
= note: move occurs because `c.1` has type `(i32, (i32, String))`, which does not implement the `Copy` trait
|
2022-11-02 23:22:24 -05:00
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | ref c2 => {
|
|
|
|
| +++
|
2018-10-11 18:33:08 -05:00
|
|
|
|
|
|
|
error: aborting due to 23 previous errors
|
|
|
|
|
2019-04-17 12:26:38 -05:00
|
|
|
Some errors have detailed explanations: E0381, E0382.
|
2018-10-11 18:33:08 -05:00
|
|
|
For more information about an error, try `rustc --explain E0381`.
|