]> git.lizzy.rs Git - rust.git/blob - src/test/ui/asm/x86_64/type-check-5.stderr
Auto merge of #98471 - wesleywiser:update_measureme, r=Mark-Simulacrum
[rust.git] / src / test / ui / asm / x86_64 / type-check-5.stderr
1 error[E0381]: used binding `x` isn't initialized
2   --> $DIR/type-check-5.rs:15:28
3    |
4 LL |         let x: u64;
5    |             - binding declared here but left uninitialized
6 LL |         asm!("{}", in(reg) x);
7    |                            ^ `x` used here but it isn't initialized
8
9 error[E0381]: used binding `y` isn't initialized
10   --> $DIR/type-check-5.rs:18:9
11    |
12 LL |         let mut y: u64;
13    |             ----- binding declared here but left uninitialized
14 LL |         asm!("{}", inout(reg) y);
15    |         ^^^^^^^^^^^^^^^^^^^^^^^^ `y` used here but it isn't initialized
16
17 error[E0596]: cannot borrow `v` as mutable, as it is not declared as mutable
18   --> $DIR/type-check-5.rs:26:29
19    |
20 LL |         let v: Vec<u64> = vec![0, 1, 2];
21    |             - help: consider changing this to be mutable: `mut v`
22 LL |         asm!("{}", in(reg) v[0]);
23 LL |         asm!("{}", out(reg) v[0]);
24    |                             ^ cannot borrow as mutable
25
26 error[E0596]: cannot borrow `v` as mutable, as it is not declared as mutable
27   --> $DIR/type-check-5.rs:28:31
28    |
29 LL |         let v: Vec<u64> = vec![0, 1, 2];
30    |             - help: consider changing this to be mutable: `mut v`
31 ...
32 LL |         asm!("{}", inout(reg) v[0]);
33    |                               ^ cannot borrow as mutable
34
35 error: aborting due to 4 previous errors
36
37 Some errors have detailed explanations: E0381, E0596.
38 For more information about an error, try `rustc --explain E0381`.