radium icon indicating copy to clipboard operation
radium copied to clipboard

Build fails on stable rust

Open youknowone opened this issue 8 months ago • 1 comments

Nightly recently added std::sync::Atomic. This is shadowing crate::marker::Atomic.

Avoiding * import for either import will fix it.

error[E0404]: expected trait, found type alias `Atomic`
   --> /opt/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/radium-1.1.0/src/lib.rs:804:5
    |
804 |     T: Atomic + PartialEq,
    |        ^^^^^^ type aliases cannot be used as traits
    |
help: you might have meant to use `#![feature(trait_alias)]` instead of a `type` alias
   --> /opt/rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:342:1
    |
342 - pub type Atomic<T> = <T as AtomicPrimitive>::AtomicInner;
342 + pub trait Atomic<T> = <T as AtomicPrimitive>::AtomicInner;
    |
help: consider importing this trait instead
    |
9   + use crate::marker::Atomic;
    |

error[E0659]: `Atomic` is ambiguous
   --> /opt/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/radium-1.1.0/src/lib.rs:804:5
    |
804 |     T: Atomic + PartialEq,
    |        ^^^^^^ ambiguous name
    |
    = note: ambiguous because of multiple glob imports of a name in the same module
note: `Atomic` could refer to the type alias imported here
   --> /opt/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/radium-1.1.0/src/lib.rs:11:2
    |
11  |     sync::atomic::*,
    |     ^^^^^^^^^^^^^^^
    = help: consider adding an explicit import of `Atomic` to disambiguate
note: `Atomic` could also refer to the trait imported here
   --> /opt/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/radium-1.1.0/src/lib.rs:14:5
    |
14  | use crate::marker::*;
    |     ^^^^^^^^^^^^^^^^
    = help: consider adding an explicit import of `Atomic` to disambiguate

youknowone avatar May 06 '25 06:05 youknowone

I encountered the same issue when building RustPython with nightly rust... this crate doesn't seem to be maintained 👀

theoparis avatar May 08 '25 01:05 theoparis