rust/tests/ui/numbers-arithmetic
John Millikin 4e2797dd76 Implement Neg for signed non-zero integers.
Negating a non-zero integer currently requires unpacking to a
primitive and re-wrapping. Since negation of non-zero signed
integers always produces a non-zero result, it is safe to
implement `Neg` for `NonZeroI{N}`.

The new `impl` is marked as stable because trait implementations
for two stable types can't be marked unstable.
2023-04-20 14:27:29 +09:00
..
arith-unsigned.rs
div-mod.rs
divide-by-zero.rs
float2.rs
float_math.rs
float-int-invalid-const-cast.rs
float-literal-inference.rs
float-nan.rs
float-signature.rs
float.rs
floatlits.rs
i8-incr.rs
i32-sub.rs
i128.rs
int-abs-overflow.rs
int.rs
integer-literal-radix.rs
integer-literal-suffix-inference-2.rs
integer-literal-suffix-inference-3.rs
integer-literal-suffix-inference.rs
issue-8460-const.noopt.stderr
issue-8460-const.opt_with_overflow_checks.stderr
issue-8460-const.opt.stderr
issue-8460-const.rs
issue-8460.rs
issue-105626.rs Add regression test for #105626 2023-02-23 08:39:23 +09:00
mod-zero.rs
next-power-of-two-overflow-debug.rs
next-power-of-two-overflow-ndebug.rs
not-suggest-float-literal.rs
not-suggest-float-literal.stderr
num-wrapping.rs
numeric-method-autoexport.rs
overflowing-add.rs
overflowing-lsh-1.rs
overflowing-lsh-1.stderr
overflowing-lsh-2.rs
overflowing-lsh-2.stderr
overflowing-lsh-3.rs
overflowing-lsh-3.stderr
overflowing-lsh-4.rs
overflowing-lsh-4.stderr
overflowing-mul.rs
overflowing-neg-nonzero.rs Implement Neg for signed non-zero integers. 2023-04-20 14:27:29 +09:00
overflowing-neg.rs
overflowing-pow-signed.rs
overflowing-pow-unsigned.rs
overflowing-rsh-1.rs
overflowing-rsh-1.stderr
overflowing-rsh-2.rs
overflowing-rsh-2.stderr
overflowing-rsh-3.rs
overflowing-rsh-3.stderr
overflowing-rsh-4.rs
overflowing-rsh-4.stderr
overflowing-rsh-5.rs
overflowing-rsh-5.stderr
overflowing-rsh-6.rs
overflowing-rsh-6.stderr
overflowing-sub.rs
promoted_overflow_opt.rs
promoted_overflow.rs
saturating-float-casts-impl.rs Add some reasons why tests are ignored. 2023-04-15 16:11:42 -07:00
saturating-float-casts-wasm.rs
saturating-float-casts.rs
shift-near-oflo.rs
shift-various-types.rs
shift.rs
signed-shift-const-eval.rs
suggest-float-literal.fixed
suggest-float-literal.rs
suggest-float-literal.stderr
u8-incr-decr.rs
u8-incr.rs
u32-decr.rs
u128-as-f32.rs
u128.rs
uint.rs
unary-minus-suffix-inference.rs