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

ices/73663.rs: fixed with errors #1381

Merged
merged 1 commit into from
Aug 12, 2022
Merged

ices/73663.rs: fixed with errors #1381

merged 1 commit into from
Aug 12, 2022

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#73663

macro_rules! cbor_map {
    ($key:expr) => {
        $key.signum();
    };
}

fn main() {
    cbor_map! { #[cfg(test)] 4};
}
=== stdout ===
=== stderr ===
error[E0658]: attributes on expressions are experimental
 --> /home/runner/work/glacier/glacier/ices/73663.rs:8:17
  |
8 |     cbor_map! { #[cfg(test)] 4};
  |                 ^^^^^^^^^^^^
  |
  = note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information
  = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable

error: removing an expression is not supported in this position
 --> /home/runner/work/glacier/glacier/ices/73663.rs:8:17
  |
8 |     cbor_map! { #[cfg(test)] 4};
  |                 ^^^^^^^^^^^^

error[E0689]: can't call method `signum` on ambiguous numeric type `{integer}`
 --> /home/runner/work/glacier/glacier/ices/73663.rs:3:14
  |
3 |         $key.signum();
  |              ^^^^^^
...
8 |     cbor_map! { #[cfg(test)] 4};
  |     --------------------------- in this macro invocation
  |
  = note: this error originates in the macro `cbor_map` (in Nightly builds, run with -Z macro-backtrace for more info)
help: you must specify a concrete type for this numeric value, like `i32`
  |
8 |     cbor_map! { #[cfg(test)] 4_i32};
  |                              ~~~~~

error: aborting due to 3 previous errors

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

=== stdout ===
=== stderr ===
error[E0658]: attributes on expressions are experimental
 --> /home/runner/work/glacier/glacier/ices/73663.rs:8:17
  |
8 |     cbor_map! { #[cfg(test)] 4};
  |                 ^^^^^^^^^^^^
  |
  = note: see issue #15701 <rust-lang/rust#15701> for more information
  = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable

error: removing an expression is not supported in this position
 --> /home/runner/work/glacier/glacier/ices/73663.rs:8:17
  |
8 |     cbor_map! { #[cfg(test)] 4};
  |                 ^^^^^^^^^^^^

error[E0689]: can't call method `signum` on ambiguous numeric type `{integer}`
 --> /home/runner/work/glacier/glacier/ices/73663.rs:3:14
  |
3 |         $key.signum();
  |              ^^^^^^
...
8 |     cbor_map! { #[cfg(test)] 4};
  |     --------------------------- in this macro invocation
  |
  = note: this error originates in the macro `cbor_map` (in Nightly builds, run with -Z macro-backtrace for more info)
help: you must specify a concrete type for this numeric value, like `i32`
  |
8 |     cbor_map! { #[cfg(test)] 4_i32};
  |                              ~~~~~

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0658, E0689.
For more information about an error, try `rustc --explain E0658`.
==============
@JohnTitor JohnTitor merged commit a04cfb5 into master Aug 12, 2022
@JohnTitor JohnTitor deleted the autofix/ices/73663.rs branch August 12, 2022 08:12
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