2025-04-22 14:56:45 +10:00
|
|
|
macro_rules! m1 {
|
|
|
|
|
($abi: literal) => { extern $abi } //~ ERROR expected expression, found keyword `extern`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
macro_rules! m2 {
|
|
|
|
|
($abi: expr) => { extern $abi } //~ ERROR expected expression, found keyword `extern`
|
2025-04-11 10:45:14 +10:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {
|
2025-04-22 14:56:45 +10:00
|
|
|
m1!(-2)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn f() {
|
|
|
|
|
m2!(-2)
|
2025-04-11 10:45:14 +10:00
|
|
|
}
|