mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-14 17:48:10 +00:00
16 lines
254 B
Rust
16 lines
254 B
Rust
#![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
|
|
}
|