mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
11 lines
183 B
Rust
11 lines
183 B
Rust
// run-pass
|
|
|
|
struct A;
|
|
|
|
macro_rules! make_thirteen_method {() => (fn thirteen(&self)->isize {13})}
|
|
impl A { make_thirteen_method!(); }
|
|
|
|
fn main() {
|
|
assert_eq!(A.thirteen(),13);
|
|
}
|