2015-12-15 17:31:54 +13:00
|
|
|
macro_rules! foo {
|
|
|
|
($id: ident) => {
|
|
|
|
$id
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Testing that the error span points to the parameter 'x' in the callsite,
|
|
|
|
// not to the macro variable '$id'
|
|
|
|
fn main() {
|
|
|
|
foo!(
|
2017-01-12 01:18:08 +03:00
|
|
|
x //~ ERROR cannot find value `x` in this scope
|
2015-12-15 17:31:54 +13:00
|
|
|
);
|
|
|
|
}
|