Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cfg_match macro name conflict on the latest nightly #8

Closed
Imberflur opened this issue Nov 27, 2023 · 0 comments · Fixed by #9
Closed

cfg_match macro name conflict on the latest nightly #8

Imberflur opened this issue Nov 27, 2023 · 0 comments · Fixed by #9

Comments

@Imberflur
Copy link
Contributor

Trying to compile this with the latest nightly, I got these errors:

error[E0658]: use of unstable library feature 'cfg_match'
  --> /home/imbris/.cargo/registry/src/index.crates.io-6f17d22bba15001f/maybe-dangling-0.1.0/src/maybe_dangling.rs:65:1
   |
65 | crate::cfg_match! {
   | ^^^^^^^^^^^^^^^^
   |
   = note: see issue #115585 <https://github.com/rust-lang/rust/issues/115585> for more information
   = help: add `#![feature(cfg_match)]` to the crate attributes to enable

error: no rules expected the token `feature`
  --> /home/imbris/.cargo/registry/src/index.crates.io-6f17d22bba15001f/maybe-dangling-0.1.0/src/maybe_dangling.rs:66:5
   |
66 |     feature = "nightly-dropck_eyepatch" => {
   |     ^^^^^^^ no rules expected this token in macro call
   |
note: while trying to match `cfg`
  --> /rustc/6cf088810f66fff15d05bf7135c5f5888b7c93b4/library/core/src/macros/mod.rs:204:11

error[E0659]: `cfg_match` is ambiguous
  --> /home/imbris/.cargo/registry/src/index.crates.io-6f17d22bba15001f/maybe-dangling-0.1.0/src/lib.rs:42:5
   |
42 | use cfg_match;
   |     ^^^^^^^^^ ambiguous name
   |
   = note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
   = note: `cfg_match` could refer to a macro from prelude
note: `cfg_match` could also refer to the macro defined here
  --> /home/imbris/.cargo/registry/src/index.crates.io-6f17d22bba15001f/maybe-dangling-0.1.0/src/lib.rs:17:1
   |
17 | / macro_rules! cfg_match {
18 | |     (
19 | |         _ => { $($expansion:tt)* } $(,)?
20 | |     ) => (
...  |
40 | |     });
41 | | }
   | |_^

error[E0658]: use of unstable library feature 'cfg_match'
  --> /home/imbris/.cargo/registry/src/index.crates.io-6f17d22bba15001f/maybe-dangling-0.1.0/src/lib.rs:42:5
   |
42 | use cfg_match;
   |     ^^^^^^^^^
   |
   = note: see issue #115585 <https://github.com/rust-lang/rust/issues/115585> for more information
   = help: add `#![feature(cfg_match)]` to the crate attributes to enable

The fix made here looks promising: getditto/safer_ffi#191

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant