Repository navigation
Open
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCS-tracking-unimplementedStatus: The feature has not been implemented.Status: The feature has not been implemented.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Description
Feature gate: #![feature(const_from)]
This is a tracking issue for const From and Into traits, impls, and related functions.
Public API
const {
let x = 5_u8;
let y: i32 = x.into();
}Note: there are a hundreds of implementations that could be made const. However, while const traits are unstable, please limit new const implementations to those that are needed for some specific purpose, e.g. supporting a specific feature or experimenting with a certain aspect of . Anything that is going for "completeness" can be done after stabilization.
Steps / History
(Remember to update the S-tracking-* label when checking boxes.)
- Implementation: constify
FromandInto#143774 - Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- None yet.
Footnotes
Reacted by Fenhl, Vojtěch Křižan, Gabriel Bjørnager Jensen and Rob
Reacted by Karan Jain and Luracasmus
Reacted by jasper310899, ver-nyan, Filip Tibell, José Luis Cruz, Filiprogrammer, Joe Richey, Peter Lyons Kehl, Oleh Kulish, Marcin Anforowicz, Rudi Floren and 13 more
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCS-tracking-unimplementedStatus: The feature has not been implemented.Status: The feature has not been implemented.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Activity
Rollup merge of rust-lang#143774 - oli-obk:const_from, r=fee1-dead
Rollup merge of rust-lang#143774 - oli-obk:const_from, r=fee1-dead
Rollup merge of rust-lang#143774 - oli-obk:const_from, r=fee1-dead
Rollup merge of rust-lang#143774 - oli-obk:const_from, r=fee1-dead
Rollup merge of rust-lang#143774 - oli-obk:const_from, r=fee1-dead
Rollup merge of rust-lang#143774 - oli-obk:const_from, r=fee1-dead
Unrolled build for #143774
Rollup merge of #143774 - oli-obk:const_from, r=fee1-dead
Use const into and from for const time refinement
clarfonthey commentedon Jul 20, 2025
cc #143874
Rollup merge of rust-lang#143774 - oli-obk:const_from, r=fee1-dead
clarfonthey commentedon Jul 22, 2025
@rustbot claim
Probably will need to do this as a prereq for
const_cmp.Also gonna fix all the non-
Trytraits to point to this issue instead of #74935.37 remaining items
Unrolled build for #159554
Rollup merge of #159554 - ajtribick:int_from_ascii_bytes, r=Mark-Simu…
Rollup merge of rust-lang#162995 - sorairolake:const-nonzero-from-str…
Rollup merge of rust-lang#162995 - sorairolake:const-nonzero-from-str…
Rollup merge of rust-lang#162995 - sorairolake:const-nonzero-from-str…
Unrolled build for #162995 in rollup 163043
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…