Skip to content

Bad code for DeRon with Rust 2024 #155

Description

@pczarn

Got an error for DeRon:

cannot find type `B` in this scope
not found in this scoperustc[Click for full compiler diagnostic](rust-analyzer-diagnostics-view:/diagnostic%20message%20[0]?0#file:///home/peterb/contain-rs/bit-vec/src/lib.rs)
this function depends on never type fallback being `()`
this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions!
for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/never-type-fallback.html>
specify the types explicitly
`#[deny(dependency_on_unit_never_type_fallback)]` (part of `#[deny(rust_2024_compatibility)]`) on by defaultrustc[Click for full compiler diagnostic](rust-analyzer-diagnostics-view:/diagnostic%20message%20[1]?1#file:///home/peterb/contain-rs/bit-vec/src/lib.rs)
lib.rs(255, 27): in edition 2024, the requirement `!: DeRon` will fail
nanoserde_derive
proc_macro DeRon

On this one:

#[cfg_attr(
    feature = "nanoserde",
    derive(DeBin, DeJson, DeRon, SerBin, SerJson, SerRon)
)]
pub struct BitVec<B = u32> {
    /// Internal representation of the bit vector
    storage: Vec<B>,
    /// The number of valid bits in the internal representation
    nbits: usize,
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions