mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
cbc3bdbe01
And fix diagnostics for `self` from a macro.
21 lines
339 B
Rust
21 lines
339 B
Rust
#![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() {}
|