2017-12-10 19:47:55 +00:00
|
|
|
error: macro expansion ignores token `;` and any following
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/macro-context.rs:3:15
|
2017-12-10 19:47:55 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | () => ( i ; typeof );
|
2017-12-10 19:47:55 +00:00
|
|
|
| ^
|
2018-10-23 17:07:34 +00:00
|
|
|
...
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | let a: m!();
|
2018-10-23 17:07:34 +00:00
|
|
|
| ---- caused by the macro expansion here
|
|
|
|
|
|
|
|
|
= note: the usage of `m!` is likely invalid in type context
|
2017-12-10 19:47:55 +00:00
|
|
|
|
|
|
|
error: macro expansion ignores token `typeof` and any following
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/macro-context.rs:3:17
|
2017-12-10 19:47:55 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | () => ( i ; typeof );
|
2017-12-10 19:47:55 +00:00
|
|
|
| ^^^^^^
|
2018-10-23 17:07:34 +00:00
|
|
|
...
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | let i = m!();
|
2018-10-24 19:52:24 +00:00
|
|
|
| ---- caused by the macro expansion here
|
2018-10-23 17:07:34 +00:00
|
|
|
|
|
|
|
|
= note: the usage of `m!` is likely invalid in expression context
|
2017-12-10 19:47:55 +00:00
|
|
|
|
|
|
|
error: macro expansion ignores token `;` and any following
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/macro-context.rs:3:15
|
2017-12-10 19:47:55 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | () => ( i ; typeof );
|
2017-12-10 19:47:55 +00:00
|
|
|
| ^
|
2018-10-23 17:07:34 +00:00
|
|
|
...
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | m!() => {}
|
2018-10-23 17:07:34 +00:00
|
|
|
| ---- caused by the macro expansion here
|
|
|
|
|
|
|
|
|
= note: the usage of `m!` is likely invalid in pattern context
|
2017-12-10 19:47:55 +00:00
|
|
|
|
|
|
|
error: expected expression, found reserved keyword `typeof`
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/macro-context.rs:3:17
|
2017-12-10 19:47:55 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | () => ( i ; typeof );
|
2018-02-19 07:08:23 +00:00
|
|
|
| ^^^^^^ expected expression
|
2017-12-10 19:47:55 +00:00
|
|
|
...
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | m!();
|
2021-10-14 18:28:28 +00:00
|
|
|
| ---- in this macro invocation
|
2019-12-16 13:56:47 +00:00
|
|
|
|
|
2021-02-13 19:52:25 +00:00
|
|
|
= note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2017-12-10 19:47:55 +00:00
|
|
|
|
2020-03-17 07:55:28 +00:00
|
|
|
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
|
|
|
|
|
|
2021-02-13 19:52:25 +00:00
|
|
|
= note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2020-03-17 07:55:28 +00:00
|
|
|
|
|
|
|
error[E0425]: cannot find value `i` in this scope
|
|
|
|
--> $DIR/macro-context.rs:3:13
|
|
|
|
|
|
|
|
|
LL | () => ( i ; typeof );
|
2022-10-16 08:51:11 +00:00
|
|
|
| ^ not found in this scope
|
2020-03-17 07:55:28 +00:00
|
|
|
...
|
|
|
|
LL | let i = m!();
|
|
|
|
| ---- in this macro invocation
|
|
|
|
|
|
2021-02-13 19:52:25 +00:00
|
|
|
= note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2020-03-17 07:55:28 +00:00
|
|
|
|
2021-07-22 19:28:02 +00:00
|
|
|
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>
|
2022-09-18 15:55:36 +00:00
|
|
|
= note: `#[warn(semicolon_in_expressions_from_macros)]` on by default
|
2021-07-22 19:28:02 +00:00
|
|
|
= 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
|
2018-03-15 15:13:47 +00:00
|
|
|
|
2020-03-17 07:55:28 +00:00
|
|
|
Some errors have detailed explanations: E0412, E0425.
|
|
|
|
For more information about an error, try `rustc --explain E0412`.
|
2022-10-22 22:28:08 +00:00
|
|
|
Future incompatibility report: Future breakage diagnostic:
|
|
|
|
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>
|
|
|
|
= note: `#[warn(semicolon_in_expressions_from_macros)]` on by default
|
|
|
|
= note: this warning originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
|