rust/tests/ui/hygiene/arguments.rs

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

18 lines
302 B
Rust
Raw Normal View History

2017-05-24 21:04:03 -05:00
// ignore-pretty pretty-printing is unhygienic
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
}