rust/tests/ui/macros/macro-context.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

100 lines
3.5 KiB
Plaintext
Raw Normal View History

error: macro expansion ignores token `;` and any following
2018-12-25 15:56:47 +00:00
--> $DIR/macro-context.rs:3:15
|
2019-03-09 12:03:44 +00:00
LL | () => ( i ; typeof );
| ^
...
2018-02-23 00:42:32 +00:00
LL | let a: m!();
| ---- caused by the macro expansion here
|
= note: the usage of `m!` is likely invalid in type context
error: macro expansion ignores token `typeof` and any following
2018-12-25 15:56:47 +00:00
--> $DIR/macro-context.rs:3:17
|
2019-03-09 12:03:44 +00:00
LL | () => ( i ; typeof );
| ^^^^^^
...
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
|
= note: the usage of `m!` is likely invalid in expression context
error: macro expansion ignores token `;` and any following
2018-12-25 15:56:47 +00:00
--> $DIR/macro-context.rs:3:15
|
2019-03-09 12:03:44 +00:00
LL | () => ( i ; typeof );
| ^
...
2018-02-23 00:42:32 +00:00
LL | m!() => {}
| ---- caused by the macro expansion here
|
= note: the usage of `m!` is likely invalid in pattern context
error: expected expression, found reserved keyword `typeof`
2018-12-25 15:56:47 +00:00
--> $DIR/macro-context.rs:3:17
|
2019-03-09 12:03:44 +00:00
LL | () => ( i ; typeof );
| ^^^^^^ expected expression
...
2018-02-23 00:42:32 +00:00
LL | m!();
2021-10-14 18:28:28 +00:00
| ---- in this macro invocation
|
= 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[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
|
= 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 );
| ^ not found in this scope
2020-03-17 07:55:28 +00:00
...
LL | let i = m!();
| ---- in this macro invocation
|
= 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
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
= 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`.
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)