mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-21 17:52:12 +03:00
19 lines
184 B
Rust
19 lines
184 B
Rust
//@ check-pass
|
|
macro_rules! default {
|
|
($($x:tt)*) => { $($x)* }
|
|
}
|
|
|
|
default! {
|
|
struct A;
|
|
}
|
|
|
|
impl A {
|
|
default! {
|
|
fn foo(&self) {}
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
A.foo();
|
|
}
|