Skip to content

Tracking Issue for const_default #143894

Open
@fee1-dead

Description

@fee1-dead

Feature gate: #![feature(const_default)]

This is a tracking issue for Default in const fn

Public API

// core::default

pub const trait Default: Sized {
    fn default() -> Self;
}

impl const Default types:

  • ()
  • bool
  • char
  • std::ascii::Char
  • usize
  • u8
  • u16
  • u32
  • u64
  • u128
  • i8
  • i16
  • i32
  • i64
  • i128
  • f16
  • f32
  • f64
  • f128
  • std::marker::PhantomData<T>
  • Option<T>
  • std::iter::Empty<T>
  • std::ptr::Alignment
  • &[T]
  • &mut [T]
  • &str
  • &mut str
  • String
  • Vec<T>

Steps / History

(Remember to update the S-tracking-* label when checking boxes.)

Unresolved Questions

Footnotes

  1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCS-tracking-unimplementedStatus: The feature has not been implemented.T-libs-apiRelevant to the library API 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