summary refs log tree commit diff
path: root/tests/ui/numbers-arithmetic
AgeCommit message (Collapse)AuthorLines
2023-06-27Don't sort strings right after we just sorted by typesMichael Goulet-41/+41
2023-06-01Use translatable diagnostics in `rustc_const_eval`Deadbeef-18/+18
2023-05-11Add support for `cfg(overflow_checks)`AngelicosPhosphoros-0/+38
This PR adds support for detecting if overflow checks are enabled in similar fashion as debug_assertions are detected. Possible use-case of this, for example, if we want to use checked integer casts in builds with overflow checks, e.g. ```rust pub fn cast(val: usize)->u16 { if cfg!(overflow_checks) { val.try_into().unwrap() } else{ vas as _ } } ``` Resolves #91130. Tracking issue: #111466.
2023-04-20Implement `Neg` for signed non-zero integers.John Millikin-0/+12
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-15Add some reasons why tests are ignored.Eric Huss-1/+1
2023-03-02Auto merge of #107879 - icedrocket:update-llvm, r=cuviperbors-0/+17
Update LLVM submodule Fixes #105626
2023-02-23Add regression test for #105626icedrocket-0/+17
2023-01-18Support `true` and `false` as boolean flag paramsNilstrieb-1/+1
Implements MCP 577.
2023-01-11Move /src/test to /testsAlbert Larsan-0/+3352