rust/library/core/src/ops
Matthias Krüger 20bb93210d
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`](https://github.com/rust-lang/rust/issues/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)
2021-10-30 14:36:58 +02:00
..
arith.rs Added const versions of common numeric operations 2021-10-22 10:03:18 +13:00
bit.rs Added const versions of common numeric operations 2021-10-22 10:03:18 +13:00
control_flow.rs Fix and extend ControlFlow traverse_inorder example 2021-10-24 20:12:22 +02:00
deref.rs Const Deref 2021-09-15 03:06:53 +00:00
drop.rs Fix typo in ops::Drop docs 2021-07-07 22:26:32 +03:00
function.rs Convert primitives to use intra-doc links 2021-02-25 20:31:53 -05:00
generator.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
index.rs Say that it "may panic" 2021-04-18 18:16:10 +02:00
mod.rs Remove the TryV2 alias 2021-08-21 15:09:03 -07:00
range.rs Update range.rs 2021-07-27 16:14:48 -04:00
try_trait.rs Fix may not to appropriate might not or must not 2021-07-29 01:15:20 -04:00
unsize.rs Use intra-doc-links in core::ops::* 2020-08-21 23:19:10 +02:00