fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0381]: partially assigned binding `s` isn't fully initialized 2 --> $DIR/issue-21232-partial-init-and-use.rs:97:5 3 | 4LL | let s: S<B>; 5 | - binding declared here but left uninitialized 6LL | s.x = 10; s.y = Box::new(20); 7 | ^^^^^^^^ `s` partially assigned here but it isn't fully initialized 8 | 9 = help: partial initialization isn't supported, fully initialize the binding with a default value and mutate it, or use `std::mem::MaybeUninit` 10 11error[E0381]: partially assigned binding `t` isn't fully initialized 12 --> $DIR/issue-21232-partial-init-and-use.rs:103:5 13 | 14LL | let t: T; 15 | - binding declared here but left uninitialized 16LL | t.0 = 10; t.1 = Box::new(20); 17 | ^^^^^^^^ `t` partially assigned here but it isn't fully initialized 18 | 19 = help: partial initialization isn't supported, fully initialize the binding with a default value and mutate it, or use `std::mem::MaybeUninit` 20 21error[E0382]: assign to part of moved value: `s` 22 --> $DIR/issue-21232-partial-init-and-use.rs:109:5 23 | 24LL | let mut s: S<B> = S::new(); drop(s); 25 | ----- - value moved here 26 | | 27 | move occurs because `s` has type `S<Box<u32>>`, which does not implement the `Copy` trait 28LL | s.x = 10; s.y = Box::new(20); 29 | ^^^^^^^^ value partially assigned here after move 30 31error[E0382]: assign to part of moved value: `t` 32 --> $DIR/issue-21232-partial-init-and-use.rs:116:5 33 | 34LL | let mut t: T = (0, Box::new(0)); drop(t); 35 | ----- - value moved here 36 | | 37 | move occurs because `t` has type `(u32, Box<u32>)`, which does not implement the `Copy` trait 38LL | t.0 = 10; t.1 = Box::new(20); 39 | ^^^^^^^^ value partially assigned here after move 40 | 41help: consider cloning the value if the performance cost is acceptable 42 | 43LL | let mut t: T = (0, Box::new(0)); drop(t.clone()); 44 | ++++++++ 45 46error[E0381]: partially assigned binding `s` isn't fully initialized 47 --> $DIR/issue-21232-partial-init-and-use.rs:123:5 48 | 49LL | let s: S<B>; 50 | - binding declared here but left uninitialized 51LL | s.x = 10; 52 | ^^^^^^^^ `s` partially assigned here but it isn't fully initialized 53 | 54 = help: partial initialization isn't supported, fully initialize the binding with a default value and mutate it, or use `std::mem::MaybeUninit` 55 56error[E0381]: partially assigned binding `t` isn't fully initialized 57 --> $DIR/issue-21232-partial-init-and-use.rs:129:5 58 | 59LL | let t: T; 60 | - binding declared here but left uninitialized 61LL | t.0 = 10; 62 | ^^^^^^^^ `t` partially assigned here but it isn't fully initialized 63 | 64 = help: partial initialization isn't supported, fully initialize the binding with a default value and mutate it, or use `std::mem::MaybeUninit` 65 66error[E0382]: assign to part of moved value: `s` 67 --> $DIR/issue-21232-partial-init-and-use.rs:135:5 68 | 69LL | let mut s: S<B> = S::new(); drop(s); 70 | ----- - value moved here 71 | | 72 | move occurs because `s` has type `S<Box<u32>>`, which does not implement the `Copy` trait 73LL | s.x = 10; 74 | ^^^^^^^^ value partially assigned here after move 75 76error[E0382]: assign to part of moved value: `t` 77 --> $DIR/issue-21232-partial-init-and-use.rs:142:5 78 | 79LL | let mut t: T = (0, Box::new(0)); drop(t); 80 | ----- - value moved here 81 | | 82 | move occurs because `t` has type `(u32, Box<u32>)`, which does not implement the `Copy` trait 83LL | t.0 = 10; 84 | ^^^^^^^^ value partially assigned here after move 85 | 86help: consider cloning the value if the performance cost is acceptable 87 | 88LL | let mut t: T = (0, Box::new(0)); drop(t.clone()); 89 | ++++++++ 90 91error[E0381]: partially assigned binding `s` isn't fully initialized 92 --> $DIR/issue-21232-partial-init-and-use.rs:149:5 93 | 94LL | let s: S<Void>; 95 | - binding declared here but left uninitialized 96LL | s.x = 10; 97 | ^^^^^^^^ `s` partially assigned here but it isn't fully initialized 98 | 99 = help: partial initialization isn't supported, fully initialize the binding with a default value and mutate it, or use `std::mem::MaybeUninit` 100 101error[E0381]: partially assigned binding `t` isn't fully initialized 102 --> $DIR/issue-21232-partial-init-and-use.rs:155:5 103 | 104LL | let t: Tvoid; 105 | - binding declared here but left uninitialized 106LL | t.0 = 10; 107 | ^^^^^^^^ `t` partially assigned here but it isn't fully initialized 108 | 109 = help: partial initialization isn't supported, fully initialize the binding with a default value and mutate it, or use `std::mem::MaybeUninit` 110 111error[E0381]: partially assigned binding `q` isn't fully initialized 112 --> $DIR/issue-21232-partial-init-and-use.rs:170:5 113 | 114LL | let q: Q<S<B>>; 115 | - binding declared here but left uninitialized 116LL | q.r.f.x = 10; q.r.f.y = Box::new(20); 117 | ^^^^^^^^^^^^ `q.r.f` partially assigned here but it isn't fully initialized 118 | 119 = help: partial initialization isn't supported, fully initialize the binding with a default value and mutate it, or use `std::mem::MaybeUninit` 120 121error[E0381]: partially assigned binding `q` isn't fully initialized 122 --> $DIR/issue-21232-partial-init-and-use.rs:176:5 123 | 124LL | let q: Q<T>; 125 | - binding declared here but left uninitialized 126LL | q.r.f.0 = 10; q.r.f.1 = Box::new(20); 127 | ^^^^^^^^^^^^ `q.r.f` partially assigned here but it isn't fully initialized 128 | 129 = help: partial initialization isn't supported, fully initialize the binding with a default value and mutate it, or use `std::mem::MaybeUninit` 130 131error[E0382]: assign to part of moved value: `q.r` 132 --> $DIR/issue-21232-partial-init-and-use.rs:182:5 133 | 134LL | let mut q: Q<S<B>> = Q::new(S::new()); drop(q.r); 135 | --- value moved here 136LL | q.r.f.x = 10; q.r.f.y = Box::new(20); 137 | ^^^^^^^^^^^^ value partially assigned here after move 138 | 139 = note: move occurs because `q.r` has type `R<S<Box<u32>>>`, which does not implement the `Copy` trait 140 141error[E0382]: assign to part of moved value: `q.r` 142 --> $DIR/issue-21232-partial-init-and-use.rs:189:5 143 | 144LL | let mut q: Q<T> = Q::new((0, Box::new(0))); drop(q.r); 145 | --- value moved here 146LL | q.r.f.0 = 10; q.r.f.1 = Box::new(20); 147 | ^^^^^^^^^^^^ value partially assigned here after move 148 | 149 = note: move occurs because `q.r` has type `R<(u32, Box<u32>)>`, which does not implement the `Copy` trait 150 151error[E0381]: partially assigned binding `q` isn't fully initialized 152 --> $DIR/issue-21232-partial-init-and-use.rs:196:5 153 | 154LL | let q: Q<S<B>>; 155 | - binding declared here but left uninitialized 156LL | q.r.f.x = 10; 157 | ^^^^^^^^^^^^ `q.r.f` partially assigned here but it isn't fully initialized 158 | 159 = help: partial initialization isn't supported, fully initialize the binding with a default value and mutate it, or use `std::mem::MaybeUninit` 160 161error[E0381]: partially assigned binding `q` isn't fully initialized 162 --> $DIR/issue-21232-partial-init-and-use.rs:202:5 163 | 164LL | let q: Q<T>; 165 | - binding declared here but left uninitialized 166LL | q.r.f.0 = 10; 167 | ^^^^^^^^^^^^ `q.r.f` partially assigned here but it isn't fully initialized 168 | 169 = help: partial initialization isn't supported, fully initialize the binding with a default value and mutate it, or use `std::mem::MaybeUninit` 170 171error[E0382]: assign to part of moved value: `q.r` 172 --> $DIR/issue-21232-partial-init-and-use.rs:208:5 173 | 174LL | let mut q: Q<S<B>> = Q::new(S::new()); drop(q.r); 175 | --- value moved here 176LL | q.r.f.x = 10; 177 | ^^^^^^^^^^^^ value partially assigned here after move 178 | 179 = note: move occurs because `q.r` has type `R<S<Box<u32>>>`, which does not implement the `Copy` trait 180 181error[E0382]: assign to part of moved value: `q.r` 182 --> $DIR/issue-21232-partial-init-and-use.rs:215:5 183 | 184LL | let mut q: Q<T> = Q::new((0, Box::new(0))); drop(q.r); 185 | --- value moved here 186LL | q.r.f.0 = 10; 187 | ^^^^^^^^^^^^ value partially assigned here after move 188 | 189 = note: move occurs because `q.r` has type `R<(u32, Box<u32>)>`, which does not implement the `Copy` trait 190 191error[E0381]: partially assigned binding `q` isn't fully initialized 192 --> $DIR/issue-21232-partial-init-and-use.rs:222:5 193 | 194LL | let mut q: Q<S<Void>>; 195 | ----- binding declared here but left uninitialized 196LL | q.r.f.x = 10; 197 | ^^^^^^^^^^^^ `q.r.f` partially assigned here but it isn't fully initialized 198 | 199 = help: partial initialization isn't supported, fully initialize the binding with a default value and mutate it, or use `std::mem::MaybeUninit` 200 201error[E0381]: partially assigned binding `q` isn't fully initialized 202 --> $DIR/issue-21232-partial-init-and-use.rs:228:5 203 | 204LL | let mut q: Q<Tvoid>; 205 | ----- binding declared here but left uninitialized 206LL | q.r.f.0 = 10; 207 | ^^^^^^^^^^^^ `q.r.f` partially assigned here but it isn't fully initialized 208 | 209 = help: partial initialization isn't supported, fully initialize the binding with a default value and mutate it, or use `std::mem::MaybeUninit` 210 211error[E0382]: assign to part of moved value: `c` 212 --> $DIR/issue-21232-partial-init-and-use.rs:245:13 213 | 214LL | let mut c = (1, "".to_owned()); 215 | ----- move occurs because `c` has type `(i32, String)`, which does not implement the `Copy` trait 216LL | match c { 217LL | c2 => { 218 | -- value moved here 219LL | c.0 = 2; 220 | ^^^^^^^ value partially assigned here after move 221 | 222help: borrow this binding in the pattern to avoid moving the value 223 | 224LL | ref c2 => { 225 | +++ 226 227error[E0382]: assign to part of moved value: `c` 228 --> $DIR/issue-21232-partial-init-and-use.rs:255:13 229 | 230LL | let mut c = (1, (1, "".to_owned())); 231 | ----- move occurs because `c` has type `(i32, (i32, String))`, which does not implement the `Copy` trait 232LL | match c { 233LL | c2 => { 234 | -- value moved here 235LL | (c.1).0 = 2; 236 | ^^^^^^^^^^^ value partially assigned here after move 237 | 238help: borrow this binding in the pattern to avoid moving the value 239 | 240LL | ref c2 => { 241 | +++ 242 243error[E0382]: assign to part of moved value: `c.1` 244 --> $DIR/issue-21232-partial-init-and-use.rs:263:13 245 | 246LL | c2 => { 247 | -- value moved here 248LL | ((c.1).1).0 = 3; 249 | ^^^^^^^^^^^^^^^ value partially assigned here after move 250 | 251 = note: move occurs because `c.1` has type `(i32, (i32, String))`, which does not implement the `Copy` trait 252help: borrow this binding in the pattern to avoid moving the value 253 | 254LL | ref c2 => { 255 | +++ 256 257error: aborting due to 23 previous errors 258 259Some errors have detailed explanations: E0381, E0382. 260For more information about an error, try `rustc --explain E0381`.