about summary refs log tree commit diff
path: root/tests/ui/delegation/self-hygiene.rs
blob: dac6c319416a31ae6987405e26674cbb04485ec9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#![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() {}