-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Make the NonZero* methods const fn #53331
Copy link
Copy link
Closed
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Metadata
Metadata
Assignees
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
and undo the const -> fn changes in https://github.com/rust-lang/rust/pull/53315/files#diff-a4a060a3c734b42317d2b9136d68918eL186
This requires changing applicable methods on
NonZero*fromfntoconst fn, adding the#[rustc_const_unstable="const_nonzero*_methods"]attribute to all of them and adding some tests ensuring that the methods are not const fn on stable rust.