Skip to content

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

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.

No activity

Activity on this issue will appear here.

Activity

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

    A-arrayArea: `[T; N]`C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-api[DEPRECATED; DO NOT USE]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