Skip to content

Remove untagged_unions feature #924

Closed
@RalfJung

Description

@RalfJung
Member

Once rust-lang/rust#77547 lands, I think the untagged_unions feature can be removed from stdarch. I do not know what the usual process for this is, does stdarch use bootstrap flags like everything else?

I also noticed stdarch tests use unions to transmute things. Is there any particular reason why the tests do not use transmute? Note in particular that stdarch is using unions incorrectly here; without repr(C), there is no guarantee that the union fields all start at the same offset.

Activity

Amanieu

Amanieu commented on Oct 5, 2020

@Amanieu
Member

It's fine for stdarch to use the bootstrap flag since it is built as a submodule of core. This will be ignored in CI which builds it as a separate crate.

Regarding the tests I don't think there was any intentional reason to use unions. I wouldn't mind a PR changing them to use transmute or repr(C) unions instead.

Mark-Simulacrum

Mark-Simulacrum commented on Oct 5, 2020

@Mark-Simulacrum
Member

No, please try to avoid using bootstrap in submodules, as we need to orchestrate a dance of dropping it (requiring submodule updates and potential upstream CI breakage) when bumping the beta compiler.

If it's unavoidable, fine, but please then try to make sure that the submodule can work with the flag enabled on nightly too, though perhaps with less functionality or something like that.

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @Amanieu@RalfJung@Mark-Simulacrum

      Issue actions

        Remove untagged_unions feature · Issue #924 · rust-lang/stdarch