mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 17:53:56 +00:00
14 lines
241 B
Rust
14 lines
241 B
Rust
macro_rules! foo {
|
|
($d:expr) => {{
|
|
fn bar(d: u8) { }
|
|
bar(&mut $d);
|
|
//~^ ERROR mismatched types
|
|
//~| expected `u8`, found `&mut u8`
|
|
}}
|
|
}
|
|
|
|
fn main() {
|
|
foo!(0u8);
|
|
//~^ in this expansion of foo!
|
|
}
|