| Age | Commit message (Collapse) | Author | Lines |
|
add track_caller for arith ops
Fixes #114814
`#[track_caller]` is works, r? `@scottmcm`
|
|
Update the minimum external LLVM to 16.
With this change, we'll have stable support for LLVM 16 and 17.
For reference, the previous increase to LLVM 15 was #114148
[Relevant zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/riscv.20forced-atomics)
|
|
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
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.
|
|
|
|
Update LLVM submodule
Fixes #105626
|
|
|
|
Implements MCP 577.
|
|
|