macro-context.stderr 2.8 KB
Newer Older
1
error: macro expansion ignores token `;` and any following
M
Mark Rousskov 已提交
2
  --> $DIR/macro-context.rs:3:15
3
   |
V
Vadim Petrochenkov 已提交
4
LL |     () => ( i ; typeof );
5
   |               ^
6
...
V
Vadim Petrochenkov 已提交
7
LL |     let a: m!();
8 9 10
   |            ---- caused by the macro expansion here
   |
   = note: the usage of `m!` is likely invalid in type context
11 12

error: macro expansion ignores token `typeof` and any following
M
Mark Rousskov 已提交
13
  --> $DIR/macro-context.rs:3:17
14
   |
V
Vadim Petrochenkov 已提交
15
LL |     () => ( i ; typeof );
16
   |                 ^^^^^^
17
...
V
Vadim Petrochenkov 已提交
18
LL |     let i = m!();
19
   |             ---- caused by the macro expansion here
20 21
   |
   = note: the usage of `m!` is likely invalid in expression context
22 23

error: macro expansion ignores token `;` and any following
M
Mark Rousskov 已提交
24
  --> $DIR/macro-context.rs:3:15
25
   |
V
Vadim Petrochenkov 已提交
26
LL |     () => ( i ; typeof );
27
   |               ^
28
...
V
Vadim Petrochenkov 已提交
29
LL |         m!() => {}
30 31 32
   |         ---- caused by the macro expansion here
   |
   = note: the usage of `m!` is likely invalid in pattern context
33 34

error: expected expression, found reserved keyword `typeof`
M
Mark Rousskov 已提交
35
  --> $DIR/macro-context.rs:3:17
36
   |
V
Vadim Petrochenkov 已提交
37
LL |     () => ( i ; typeof );
38
   |                 ^^^^^^ expected expression
39
...
V
Vadim Petrochenkov 已提交
40
LL |     m!();
C
Cameron Steffen 已提交
41
   |     ---- in this macro invocation
42
   |
43
   = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
44

45 46 47 48 49 50 51 52 53
error[E0412]: cannot find type `i` in this scope
  --> $DIR/macro-context.rs:3:13
   |
LL |     () => ( i ; typeof );
   |             ^ help: a builtin type with a similar name exists: `i8`
...
LL |     let a: m!();
   |            ---- in this macro invocation
   |
54
   = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
55 56 57 58 59

error[E0425]: cannot find value `i` in this scope
  --> $DIR/macro-context.rs:3:13
   |
LL |     () => ( i ; typeof );
60
   |             ^ not found in this scope
61 62 63 64
...
LL |     let i = m!();
   |             ---- in this macro invocation
   |
65
   = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
66

67 68 69 70 71 72 73 74 75 76 77
warning: trailing semicolon in macro used in expression position
  --> $DIR/macro-context.rs:3:15
   |
LL |     () => ( i ; typeof );
   |               ^
...
LL |     let i = m!();
   |             ---- in this macro invocation
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
M
Maybe Waffle 已提交
78
   = note: `#[warn(semicolon_in_expressions_from_macros)]` on by default
79 80 81
   = note: this warning originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 6 previous errors; 1 warning emitted
J
John Kåre Alsaker 已提交
82

83 84
Some errors have detailed explanations: E0412, E0425.
For more information about an error, try `rustc --explain E0412`.