Skip to content

Fix incorrect use of MaybeUninit::assume_init_mut in flt2dec #76092

Closed
@Dylan-DPC-zz

Description

@Dylan-DPC-zz

Creating this issue to track this FIXME note in float formatting:

This is calling get_mut on an uninitialized
MaybeUninit (here and elsewhere in this file). Revisit this once
we decided whether that is valid or not.
We can do this only because we are libstd and coupled to the compiler.
(FWIW, using freeze would not be enough; flt2dec::Part is an enum!)

The issue being mentioned when the fixme was closed without addressing this concern, and the new tracking issue doesn't raise it, so created this so that we can discuss it here and link it to the tracking issue

cc @RalfJung

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-libsRelevant to the library team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions