rust/compiler/rustc_feature/src
AngelicosPhosphoros 7c263adb2a Add support for cfg(overflow_checks)
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-05-11 18:06:31 +04:00
..
accepted.rs Rollup merge of #109677 - dpaoliello:rawdylib, r=michaelwoerister,wesleywiser 2023-05-06 09:09:30 +09:00
active.rs Add support for cfg(overflow_checks) 2023-05-11 18:06:31 +04:00
builtin_attrs.rs Add support for cfg(overflow_checks) 2023-05-11 18:06:31 +04:00
lib.rs Stabilize a portion of 'once_cell' 2023-03-29 18:04:44 -04:00
removed.rs replace version placeholders 2023-04-28 08:47:55 -07:00
tests.rs tidy: Re-enable check for inline unit tests 2020-12-12 19:18:44 +03:00