Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

ices/55414.rs: fixed with errors #537

Merged
merged 1 commit into from
Nov 5, 2020
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Nov 5, 2020

Issue: rust-lang/rust#55414

macro_rules! bug {
    ($expr:expr) => {
        #[rustc_dummy = $expr] // Any key-value attribute, not necessarily `doc`
        struct S;
    };
}

// Any expressions containing macro call `X` that's more complex than `X` itself.
// Parentheses will work.
bug!((line!()));

fn main() {}
=== stdout ===
=== stderr ===
error: unexpected token: `(10u32)`
  --> /home/runner/work/glacier/glacier/ices/55414.rs:3:25
   |
3  |         #[rustc_dummy = $expr] // Any key-value attribute, not necessarily `doc`
   |                         ^^^^^
...
10 | bug!((line!()));
   | ---------------- in this macro invocation
   |
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0658]: the `#[rustc_dummy]` attribute is just used for rustc unit tests and will never be stable
  --> /home/runner/work/glacier/glacier/ices/55414.rs:3:9
   |
3  |         #[rustc_dummy = $expr] // Any key-value attribute, not necessarily `doc`
   |         ^^^^^^^^^^^^^^^^^^^^^^
...
10 | bug!((line!()));
   | ---------------- in this macro invocation
   |
   = help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
   = note: this error originates in a macro (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 E0658`.
==============

=== stdout ===
=== stderr ===
error: unexpected token: `(10u32)`
  --> /home/runner/work/glacier/glacier/ices/55414.rs:3:25
   |
3  |         #[rustc_dummy = $expr] // Any key-value attribute, not necessarily `doc`
   |                         ^^^^^
...
10 | bug!((line!()));
   | ---------------- in this macro invocation
   |
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0658]: the `#[rustc_dummy]` attribute is just used for rustc unit tests and will never be stable
  --> /home/runner/work/glacier/glacier/ices/55414.rs:3:9
   |
3  |         #[rustc_dummy = $expr] // Any key-value attribute, not necessarily `doc`
   |         ^^^^^^^^^^^^^^^^^^^^^^
...
10 | bug!((line!()));
   | ---------------- in this macro invocation
   |
   = help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
   = note: this error originates in a macro (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 E0658`.
==============
@Alexendoo Alexendoo merged commit 538e474 into master Nov 5, 2020
@Alexendoo Alexendoo deleted the autofix/ices/55414.rs branch November 5, 2020 13:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants