@@ -25,24 +25,22 @@ LL | let mut y: u64 = 0;
25
25
| +++
26
26
27
27
error[E0596]: cannot borrow `v` as mutable, as it is not declared as mutable
28
- --> $DIR/type-check-2-2.rs:30:29
28
+ --> $DIR/type-check-2-2.rs:28:13
29
29
|
30
30
LL | let v: Vec<u64> = vec![0, 1, 2];
31
- | - help: consider changing this to be mutable: `mut v`
31
+ | ^ not mutable
32
32
LL | asm!("{}", in(reg) v[0]);
33
33
LL | asm!("{}", out(reg) v[0]);
34
- | ^ cannot borrow as mutable
35
-
36
- error[E0596]: cannot borrow `v` as mutable, as it is not declared as mutable
37
- --> $DIR/type-check-2-2.rs:32:31
38
- |
39
- LL | let v: Vec<u64> = vec![0, 1, 2];
40
- | - help: consider changing this to be mutable: `mut v`
41
- ...
34
+ | - cannot borrow as mutable
42
35
LL | asm!("{}", inout(reg) v[0]);
43
- | ^ cannot borrow as mutable
36
+ | - cannot borrow as mutable
37
+ |
38
+ help: consider changing this to be mutable
39
+ |
40
+ LL | let mut v: Vec<u64> = vec![0, 1, 2];
41
+ | +++
44
42
45
- error: aborting due to 4 previous errors
43
+ error: aborting due to 3 previous errors
46
44
47
45
Some errors have detailed explanations: E0381, E0596.
48
46
For more information about an error, try `rustc --explain E0381`.
0 commit comments