about summary refs log tree commit diff
path: root/tests/ui/delegation/self-hygiene.stderr
blob: fa64b7d1d7f7bdf9956a74795d24afa2fd55f8f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
error[E0424]: expected value, found module `self`
  --> $DIR/self-hygiene.rs:4:34
   |
LL |   macro_rules! emit_self { () => { self } }
   |                                    ^^^^ `self` value is a keyword only available in methods with a `self` parameter
...
LL | /     fn method(self) {
LL | |         emit_self!();
   | |         ------------ in this macro invocation
LL | |     }
   | |_____- this function has a `self` parameter, but a macro invocation can only access identifiers it receives from parameters
   |
   = note: this error originates in the macro `emit_self` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0424]: expected value, found module `self`
  --> $DIR/self-hygiene.rs:4:34
   |
LL |   macro_rules! emit_self { () => { self } }
   |                                    ^^^^ `self` value is a keyword only available in methods with a `self` parameter
...
LL | / reuse foo as bar {
LL | |     emit_self!()
   | |     ------------ in this macro invocation
LL | | }
   | |_- delegation supports a `self` parameter, but a macro invocation can only access identifiers it receives from parameters
   |
   = note: this error originates in the macro `emit_self` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0424`.