Feature gate: `#![feature(const_default)]` This is a tracking issue for `Default` in `const fn` <!-- Include a short description of the feature. --> ### Public API <!-- For most library features, it'd be useful to include a summarized version of the public API. (E.g. just the public function signatures without their doc comments or implementation.) --> ```rust // 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 <!-- For larger features, more steps might be involved. If the feature is changed later, please add those PRs here as well. --> (Remember to update the `S-tracking-*` label when checking boxes.) - [x] Implementation: #134628 - [ ] Final comment period (FCP)[^1] - [ ] Stabilization PR <!-- Once the feature has gone through a few release cycles and there are no unresolved questions left, the feature might be ready for stabilization. If this feature didn't go through the RFC process, a final comment period (FCP) is always needed before stabilization. This works as follows: A library API team member can kick off the stabilization process, at which point the rfcbot will ask all the team members to verify they agree with stabilization. Once enough members agree and there are no concerns, the final comment period begins: this issue will be marked as such and will be listed in the next This Week in Rust newsletter. If no blocking concerns are raised in that period of 10 days, a stabilization PR can be opened by anyone. --> ### Unresolved Questions <!-- Include any open questions that need to be answered before the feature can be stabilised. If multiple (unrelated) big questions come up, it can be a good idea to open a separate issue for each, to make it easier to keep track of the discussions. It's useful to link any relevant discussions and conclusions (whether on GitHub, Zulip, or the internals forum) here. --> - Blocked on https://github.com/rust-lang/rust/issues/143874 [^1]: https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html
Activity
Rollup merge of rust-lang#148757 - nxsaken:const_mem_take, r=scottmcm
Rollup merge of rust-lang#148757 - nxsaken:const_mem_take, r=scottmcm
Rollup merge of rust-lang#148757 - nxsaken:const_mem_take, r=scottmcm
Rollup merge of rust-lang#148757 - nxsaken:const_mem_take, r=scottmcm
Unrolled build for #148757
Rollup merge of #148757 - nxsaken:const_mem_take, r=scottmcm
Rollup merge of rust-lang#148757 - nxsaken:const_mem_take, r=scottmcm
Rollup merge of rust-lang#149812 - tisonkun:oncelock-const-default, r…
Rollup merge of rust-lang#149812 - tisonkun:oncelock-const-default, r…
Rollup merge of rust-lang#149812 - tisonkun:oncelock-const-default, r…
Rollup merge of rust-lang#149812 - tisonkun:oncelock-const-default, r…
Rollup merge of rust-lang#149812 - tisonkun:oncelock-const-default, r…
19 remaining items
Rollup merge of rust-lang#157878 - estebank:const-default-btreemap, r…
Rollup merge of rust-lang#157878 - estebank:const-default-btreemap, r…
Unrolled build for #157878
Rollup merge of #154929 - davidgauch:const-default-lazy, r=jhpratt
Rollup merge of rust-lang#153261 - GrigorenkoPV:stabilize/alignment, …
Rollup merge of rust-lang#153261 - GrigorenkoPV:stabilize/alignment, …
Rollup merge of rust-lang#153261 - GrigorenkoPV:stabilize/alignment, …
Rollup merge of rust-lang#153261 - GrigorenkoPV:stabilize/alignment, …
Unrolled build for #153261 in rollup 165760
Rollup merge of #153261 - GrigorenkoPV:stabilize/alignment, r=clarfon…
Rollup merge of #153261 - GrigorenkoPV:stabilize/alignment, r=clarfon…