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