Skip to content

Conversation

@WaffleLapkin
Copy link

@WaffleLapkin WaffleLapkin commented Oct 26, 2025

There are plans to remove the unconditional [T; 0]: Default impl (where T doesn't necessarily implement Default) from the standard library (see rust-lang/rust#145457). That is a breaking change that would affect this crate.

This PR fixes this by removing a dependency on that impl.

See commit description for why this works.

NB: in `&[]` the array is "const promoted", making this reference have
    type `&'static [T; 0]`. this allows us to return that reference from
    any function returning a reference to a slice or array, because
    `&'static _` can coerce to `&'short_lifetime _`.

    it's not necessary to have a field for this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant