]> git.lizzy.rs Git - rust.git/blob - src/test/ui/asm/type-check-4.stderr
Rollup merge of #99787 - aDotInTheVoid:rdj-dyn, r=camelid,notriddle,GuillaumeGomez
[rust.git] / src / test / ui / asm / type-check-4.stderr
1 error[E0506]: cannot assign to `a` because it is borrowed
2   --> $DIR/type-check-4.rs:14:9
3    |
4 LL |         let p = &a;
5    |                 -- borrow of `a` occurs here
6 LL |         asm!("{}", out(reg) a);
7    |         ^^^^^^^^^^^^^^^^^^^^^^ assignment to borrowed `a` occurs here
8 LL |
9 LL |         println!("{}", p);
10    |                        - borrow later used here
11
12 error[E0503]: cannot use `a` because it was mutably borrowed
13   --> $DIR/type-check-4.rs:22:28
14    |
15 LL |         let p = &mut a;
16    |                 ------ borrow of `a` occurs here
17 LL |         asm!("{}", in(reg) a);
18    |                            ^ use of borrowed `a`
19 LL |
20 LL |         println!("{}", p);
21    |                        - borrow later used here
22
23 error: aborting due to 2 previous errors
24
25 Some errors have detailed explanations: E0503, E0506.
26 For more information about an error, try `rustc --explain E0503`.