rust/tests/ui/hygiene/arguments.rs

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

16 lines
254 B
Rust
Raw Normal View History

2017-03-24 21:37:55 -05:00
#![feature(decl_macro)]
macro m($t:ty, $e:expr) {
mod foo {
#[allow(unused)]
struct S;
pub(super) fn f(_: $t) {}
}
foo::f($e);
}
fn main() {
struct S;
m!(S, S); //~ ERROR cannot find type `S` in this scope
2017-03-24 21:37:55 -05:00
}