rust/tests/ui/macros/macro-parameter-span.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
264 B
Rust
Raw Normal View History

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!(
x //~ ERROR cannot find value `x` in this scope
);
}