mirror of
https://git.proxmox.com/git/rustc
synced 2025-05-02 17:25:45 +00:00
14 lines
261 B
Rust
14 lines
261 B
Rust
macro_rules! bad {
|
|
($s:ident whatever) => {
|
|
{
|
|
let $s = 0;
|
|
*&mut $s = 0;
|
|
//~^ ERROR cannot borrow `foo` as mutable, as it is not declared as mutable [E0596]
|
|
}
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
bad!(foo whatever);
|
|
}
|