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

ices/69396.rs: fixed with errors #302

Merged
merged 1 commit into from
Mar 3, 2020
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Mar 3, 2020

Issue: rust-lang/rust#69396

macro_rules! suite {
    ( $( $fn:ident; )* ) => {
        $(
            const A = "A".$fn();
        )*
    }
}

suite! {
    len;
    is_empty;
}

fn main() {}
=== stdout ===
=== stderr ===
error[E0428]: the name `A` is defined multiple times
  --> /home/runner/work/glacier/glacier/ices/69396.rs:4:13
   |
4  |               const A = "A".$fn();
   |               ^^^^^^^^^^^^^^^^^^^^
   |               |
   |               `A` redefined here
   |               previous definition of the value `A` here
...
9  | / suite! {
10 | |     len;
11 | |     is_empty;
12 | | }
   | |_- in this macro invocation
   |
   = note: `A` must be defined only once in the value namespace of this module
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: missing type for `const` item
  --> /home/runner/work/glacier/glacier/ices/69396.rs:4:19
   |
4  |               const A = "A".$fn();
   |                     ^ help: provide a type for the item: `A: usize`
...
9  | / suite! {
10 | |     len;
11 | |     is_empty;
12 | | }
   | |_- in this macro invocation
   |
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0121]: the type placeholder `_` is not allowed within types on item signatures
  --> /home/runner/work/glacier/glacier/ices/69396.rs:4:19
   |
4  |               const A = "A".$fn();
   |                     ^
   |                     |
   |                     not allowed in type signatures
   |                     help: replace `_` with the correct type: `bool`
...
9  | / suite! {
10 | |     len;
11 | |     is_empty;
12 | | }
   | |_- in this macro invocation
   |
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0121, E0428.
For more information about an error, try `rustc --explain E0121`.
==============

=== stdout ===
=== stderr ===
error[E0428]: the name `A` is defined multiple times
  --> /home/runner/work/glacier/glacier/ices/69396.rs:4:13
   |
4  |               const A = "A".$fn();
   |               ^^^^^^^^^^^^^^^^^^^^
   |               |
   |               `A` redefined here
   |               previous definition of the value `A` here
...
9  | / suite! {
10 | |     len;
11 | |     is_empty;
12 | | }
   | |_- in this macro invocation
   |
   = note: `A` must be defined only once in the value namespace of this module
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: missing type for `const` item
  --> /home/runner/work/glacier/glacier/ices/69396.rs:4:19
   |
4  |               const A = "A".$fn();
   |                     ^ help: provide a type for the item: `A: usize`
...
9  | / suite! {
10 | |     len;
11 | |     is_empty;
12 | | }
   | |_- in this macro invocation
   |
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0121]: the type placeholder `_` is not allowed within types on item signatures
  --> /home/runner/work/glacier/glacier/ices/69396.rs:4:19
   |
4  |               const A = "A".$fn();
   |                     ^
   |                     |
   |                     not allowed in type signatures
   |                     help: replace `_` with the correct type: `bool`
...
9  | / suite! {
10 | |     len;
11 | |     is_empty;
12 | | }
   | |_- in this macro invocation
   |
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0121, E0428.
For more information about an error, try `rustc --explain E0121`.
==============
@JohnTitor JohnTitor merged commit 97eb7fb into master Mar 3, 2020
@JohnTitor JohnTitor deleted the autofix/ices/69396.rs branch March 3, 2020 12:14
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