-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #89876 - AlexApps99:const_ops, r=oli-obk
Make most std::ops traits const on numeric types This PR makes existing implementations of `std::ops` traits (`Add`, `Sub`, etc) [`impl const`](#67792) where possible. This affects: - All numeric primitives (`u*`, `i*`, `f*`) - `NonZero*` - `Wrapping` This is under the `rustc_const_unstable` feature `const_ops`. I will write tests once I know what can and can't be kept for the final version of this PR. Since this is my first PR to rustc (and hopefully one of many), please give me feedback on how to better handle the PR process wherever possible. Thanks [Zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/Const.20std.3A.3Aops.20traits.20PR)
- Loading branch information
Showing
6 changed files
with
235 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.