rust/tests/ui/delegation/self-hygiene.rs

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

21 lines
339 B
Rust
Raw Normal View History

#![feature(fn_delegation)]
#![allow(incomplete_features)]
macro_rules! emit_self { () => { self } }
//~^ ERROR expected value, found module `self`
//~| ERROR expected value, found module `self`
struct S;
impl S {
fn method(self) {
emit_self!();
}
}
fn foo(arg: u8) {}
reuse foo as bar {
emit_self!()
}
fn main() {}