]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/reassignment_immutable_fields_twice.stderr
Rollup merge of #102500 - compiler-errors:parse-sess-cleanup, r=cjgillot
[rust.git] / src / test / ui / borrowck / reassignment_immutable_fields_twice.stderr
1 error[E0594]: cannot assign to `x.0`, as `x` is not declared as mutable
2   --> $DIR/reassignment_immutable_fields_twice.rs:7:5
3    |
4 LL |     let x: (u32, u32);
5    |         - help: consider changing this to be mutable: `mut x`
6 LL |     x = (22, 44);
7 LL |     x.0 = 1;
8    |     ^^^^^^^ cannot assign
9
10 error[E0381]: partially assigned binding `x` isn't fully initialized
11   --> $DIR/reassignment_immutable_fields_twice.rs:12:5
12    |
13 LL |     let x: (u32, u32);
14    |         - binding declared here but left uninitialized
15 LL |     x.0 = 1;
16    |     ^^^^^^^ `x` partially assigned here but it isn't fully initialized
17    |
18    = help: partial initialization isn't supported, fully initialize the binding with a default value and mutate it, or use `std::mem::MaybeUninit`
19
20 error: aborting due to 2 previous errors
21
22 Some errors have detailed explanations: E0381, E0594.
23 For more information about an error, try `rustc --explain E0381`.