rust/src/libcore/tests
Dylan DPC b6e03c464a
Rollup merge of #69813 - thomcc:nonzero-bitor, r=Amanieu
Implement BitOr and BitOrAssign for the NonZero integer types

This provides overloaded operators for `NonZero$Int | NonZero$Int`, `NonZero$Int | $Int`, and `$Int | NonZero$Int`. It also provides `BitOrAssign` where `self` is `NonZero$Int`, for symmetry.

It's a pretty small conceptual addition, but is good becasue but avoids a case where the operation is obviously sound, but you'd otherwise need unsafe to do it.

In crates trying to minimize `unsafe` usage, this is unfortunate and makes working with `NonZero` types often not worth it, even if the operations you're doing are clearly sound.

I've marked these as stable as I've been told in the past that trait impls are automatically stable. I'm happy to change it to unstable if this wasn't correct information.

I'm not entirely confident what version I should have put down, so I followed https://www.whatrustisit.com. Hopefully it's correct for this.

Apologies in advance if this has come up before, but I couldn't find it.
2020-04-25 18:30:24 +02:00
..
fmt Stop importing int/float modules in libcore 2020-04-05 11:22:01 +02:00
hash Remove assert that had been replaced by assert_ne 2020-03-01 08:04:18 -08:00
num libcore: more compact way to adjust test sizes for Miri 2020-04-23 19:50:24 +02:00
alloc.rs Add Layout::dangling() to return a well-aligned NonNull<u8> 2020-03-07 02:40:54 +01:00
any.rs Format libcore with rustfmt (including tests and benches) 2019-12-06 20:20:51 -08:00
array.rs Format libcore with rustfmt (including tests and benches) 2019-12-06 20:20:51 -08:00
ascii.rs Format libcore with rustfmt (including tests and benches) 2019-12-06 20:20:51 -08:00
atomic.rs Format libcore with rustfmt (including tests and benches) 2019-12-06 20:20:51 -08:00
bool.rs Rename to then_some and then 2019-12-06 12:24:54 +00:00
cell.rs Format libcore with rustfmt (including tests and benches) 2019-12-06 20:20:51 -08:00
char.rs Format libcore with rustfmt (including tests and benches) 2019-12-06 20:20:51 -08:00
clone.rs Remove licenses 2018-12-25 21:08:33 -07:00
cmp.rs Format the world 2019-12-22 17:42:47 -05:00
intrinsics.rs Format libcore with rustfmt (including tests and benches) 2019-12-06 20:20:51 -08:00
iter.rs Don't fuse Chain in its second iterator 2020-04-21 14:56:59 -07:00
lib.rs Don't fuse Chain in its second iterator 2020-04-21 14:56:59 -07:00
manually_drop.rs Format libcore with rustfmt (including tests and benches) 2019-12-06 20:20:51 -08:00
mem.rs Move the const-forget test into ui tests 2020-03-18 21:08:52 +01:00
nonzero.rs Implement BitOr and BitOrAssign for the NonZero integer types 2020-03-07 16:14:10 -08:00
ops.rs Use assoc float consts in libcore 2020-04-06 22:44:51 +02:00
option.rs Format libcore with rustfmt (including tests and benches) 2019-12-06 20:20:51 -08:00
pattern.rs x.py fmt after previous deignore 2019-12-24 17:38:22 -05:00
ptr.rs Format the world 2019-12-22 17:42:47 -05:00
result.rs Update test after renaming Result::as_deref 2020-01-11 03:26:09 +00:00
slice.rs libcore: more compact way to adjust test sizes for Miri 2020-04-23 19:50:24 +02:00
str.rs Remove licenses 2018-12-25 21:08:33 -07:00
str_lossy.rs Format libcore with rustfmt (including tests and benches) 2019-12-06 20:20:51 -08:00
time.rs Use integer assoc consts in libcore 2020-04-06 23:08:12 +02:00
tuple.rs Use assoc float consts in libcore 2020-04-06 22:44:51 +02:00