Skip to content

ACP: change as_{mut,const} on pointers to cast_{mut,const} #51

@Kixunil

Description

@Kixunil

Proposal

Problem statement

The as_mut method on *const T may be confused with *mut T.

Motivation, use-cases

This confusion already broke the doc once. Also I believe cast_ is more clear, especially since a similar cast() method exists.

Solution sketches

Rename the method to use cast_ prefix

Links and related work

#92675
#98174

What happens now?

This issue is part of the libs-api team API change proposal process. Once this issue is filed the libs-api team will review open proposals in its weekly meeting. You should receive feedback within a week or two.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ACP-acceptedAPI Change Proposal is accepted (seconded with no objections)T-libs-apiapi-change-proposalA proposal to add or alter unstable APIs in the standard libraries

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions