| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
Add a message for if an overflow occurs in `core::intrinsics::is_nonoverlapping`.
|
|
|
|
`core::intrinsics::is_nonoverlapping`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The macro is always used
|
|
and `unwrap` in `core::intrinsics`.
|
|
Add intra-doc links to size_of_* functions
Also some smaller doc improvements.
|
|
|
|
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
|
|
Remove some unneeded imports / qualified paths
Continuation of #105537.
|
|
Fix typos in library
I ran [`typos -w library`](https://github.com/crate-ci/typos) to fix typos in the `library` directory.
Refs #110150
|
|
Use `Display` in top-level example for `PanicInfo`
Addresses https://github.com/rust-lang/rust/issues/110098.
This confused me as well, when I was writing a `no_std` panic handler for the first time, so here's a better top-level example.
`Display` is stable, prints the `.message()` if available, and falls back to `.payload().downcast_ref<&str>()` if the message is not available. So this example should provide strictly more information and also work for formatted panics.
The old example still exists on the `payload` method.
|
|
Add links from `core::cmp` derives to their traits
Fixes #109946
Adds intra-doc links from the `core::cmp` derives to their respective traits, and a link to their derive behaviour
`@rustbot` label +A-docs
|
|
Add `tidy-alphabetical` to features in `core`
So that people have to keep them sorted in future, rather than just sticking them on the end where they conflict more often.
|
|
Add better assert messages for f32/f64 clamps
|
|
Remove obsolete test case
This test case was supposed to cover issue #31109 at some point.
It never did anything, as the issue was still open at the time of its creation.
When the issue was resolved, the `issue31109` test case was created,
making the existence of this test pointless.
|
|
r=compiler-errors
Improve safe transmute error reporting
This patch updates the error reporting when Safe Transmute is not possible between 2 types by including the reason.
Also, fix some small bugs that occur when computing the `Answer` for transmutability.
|
|
This patch updates the error reporting when Safe Transmute is not
possible between 2 types by including the reason.
Also, fix some small bugs that occur when computing the `Answer` for
transmutability.
|
|
Added diagnostic for pin! macro in addition to Box::pin if Unpin isn't implemented
I made a PR earlier, but accidentally renamed a branch and that deleted the PR... sorry for the duplicate
Currently, if an operation on `Pin<T>` is performed that requires `T` to implement `Unpin`, the diagnostic suggestion is to use `Box::pin` ("note: consider using `Box::pin`").
This PR suggests pin! as well, as that's another valid way of pinning a value, and avoids a heap allocation. Appropriate diagnostic suggestions were included to highlight the difference in semantics (local pinning for pin! vs non-local for Box::pin).
Fixes #109964
|
|
Make rust-intrinsic ABI unwindable
Fix #104451, fix https://github.com/rust-lang/miri/issues/2839
r? `@RalfJung`
|
|
|
|
So that people have to keep them sorted in future.
|
|
Typo in the documentation.
|
|
implemented
|
|
|
|
Custom MIR: Support `BinOp::Offset`
Since offset doesn't have an infix operator, a new function `Offset` is added which is lowered to `Rvalue::BinaryOp(BinOp::Offset, ..)`
r? ```@oli-obk``` or ```@tmiasko``` or ```@JakobDegen```
|
|
Stick `#[rustc_nounwind]` to all except `const_eval_select` to undo the
change for all other intrinsics.
|
|
Reword the docstring in todo! macro definition, fixing a typo
|
|
|
|
|
|
The `wrapping_neg` example for unsigned types shouldn't use `i8`
Probably it should have at least one example with an unsigned type.
|
|
|
|
|
|
Improve the floating point parser in dec2flt.
Greetings everyone,
I've benn studying the rust floating point parser recently and made the following tweaks:
* Remove all remaining traces of `unsafe`. The parser is now 100% safe Rust.
* The trick in which eight digits are processed in parallel is now in a loop.
* Parsing of inf/NaN values has been reworked.
On my system, the changes result in performance improvements for some input values.
|
|
Avoid some manual slice length calculation
No need for us to write the multiplication when `size_of_val` does exactly what we need.
(https://github.com/rust-lang/rust-clippy/pull/10601)
|
|
* Remove all remaining traces of unsafe.
* Put `parse_8digits` inside a loop.
* Rework parsing of inf/NaN values.
|
|
Revert #104100, Allow using `Range` as an `Iterator` in const contexts.
This fixes #109632.
|
|
|
|
|