mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +00:00
18 lines
302 B
Rust
18 lines
302 B
Rust
// ignore-pretty pretty-printing is unhygienic
|
|
|
|
#![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
|
|
}
|