rust/tests/ui/macros/macro-method-issue-4621.rs

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

11 lines
183 B
Rust
Raw Normal View History

// run-pass
2014-07-11 22:56:46 -05:00
struct A;
macro_rules! make_thirteen_method {() => (fn thirteen(&self)->isize {13})}
impl A { make_thirteen_method!(); }
2014-07-11 22:56:46 -05:00
fn main() {
assert_eq!(A.thirteen(),13);
}