Skip to content

Tracking Issue for {array, slice}::{from_ref, from_mut} as const fn #90206

Closed
@WaffleLapkin

Description

@WaffleLapkin

Feature gates: #![feature(const_array_from_ref)] and #![feature(const_slice_from_ref)]

This is a tracking issue for {array, slice}::{from_ref, from_mut} functions marked as const fn

Public API

This feature makes the following APIs const:

// core::array
pub const fn from_mut<T>(s: &mut T) -> &mut [T; 1];

// core::slice
pub const fn from_mut<T>(s: &mut T) -> &mut [T];

These functions as const were previously tracked here, but are now stabilized:

// core::array
pub const fn from_ref<T>(s: &T) -> &[T; 1];

// core::slice
pub const fn from_ref<T>(s: &T) -> &[T];

Steps / History

Unresolved Questions

  • None yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-arrayArea: `[T; N]`C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions