Skip to content

Tracking issue for calling standard library const fns #46038

Closed
@SimonSapin

Description

@SimonSapin

The functions below in the standard library are const fn with individual feature gates for calling them in constant expressions. This issue is tracking the stabilization of such calls.

CC #24111, the super-set feature which also includes defining new const fn items.

  • std::sync::Once::new
  • core::cell::Cell::new
  • core::cell::RefCell::new
  • core::cell::UnsafeCell::new
  • core::sync::AtomicBool::new
  • core::sync::AtomicPtr::new
  • core::sync::Atomic$IntegerType::new
  • core::mem::size_of
  • core::mem::align_of
  • core::ptr::null
  • core::ptr::null_mut
  • <$IntegerType>::max_value
  • <$IntegerType>::min_value

Items in core:: are also re-exported in std::.

Metadata

Metadata

Assignees

No one assigned

    Labels

    B-unstableBlocker: Implemented in the nightly compiler and unstable.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.final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions