about summary refs log tree commit diff
path: root/library/core
AgeCommit message (Collapse)AuthorLines
2023-04-17cmp doc examples consistency improvementsripytide-45/+46
2023-04-17fix codegen differenceDeadbeef-8/+22
2023-04-17typoskadiwa-6/+6
2023-04-17Rollup merge of #110388 - JohnBobbo96:remove-intrinsic-unwrap, r=the8472Matthias Krüger-1/+3
Add a message for if an overflow occurs in `core::intrinsics::is_nonoverlapping`.
2023-04-16Remove #[alloc_error_handler] from the compiler and libraryAmanieu d'Antras-13/+1
2023-04-16Add a message indicating overflow inJohn Bobbo-1/+3
`core::intrinsics::is_nonoverlapping`.
2023-04-16fix library and rustdoc testsDeadbeef-17/+54
2023-04-16readd `const_trait` to `Drop`, `Destruct`, and `Fn*`Deadbeef-0/+6
2023-04-16fix tidyDeadbeef-0/+3
2023-04-16core is now compilableDeadbeef-251/+85
2023-04-16more hacksDeadbeef-6/+14
2023-04-16hack cstr is_emptyDeadbeef-1/+2
2023-04-16hack signum as wellDeadbeef-2/+5
2023-04-16memchr hackDeadbeef-3/+8
2023-04-16rm const traits in libcoreDeadbeef-847/+464
2023-04-16Remove unused unused_macrosest31-1/+0
The macro is always used
2023-04-15Use a `saturating_mul` instead of a `checked_mul`John Bobbo-1/+1
and `unwrap` in `core::intrinsics`.
2023-04-16Rollup merge of #110347 - est31:size_of_links, r=jyn514Yuki Okushi-6/+13
Add intra-doc links to size_of_* functions Also some smaller doc improvements.
2023-04-15Add intra-doc links to size_of_* functionsest31-6/+13
2023-04-14Add Lazy{Cell,Lock}::into_innerAlex Saveau-0/+28
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
2023-04-14Rollup merge of #110244 - kadiwa4:unnecessary_imports, r=JohnTitorMatthias Krüger-12/+1
Remove some unneeded imports / qualified paths Continuation of #105537.
2023-04-14Rollup merge of #110154 - DaniPopes:library-typos, r=JohnTitorMatthias Krüger-3/+3
Fix typos in library I ran [`typos -w library`](https://github.com/crate-ci/typos) to fix typos in the `library` directory. Refs #110150
2023-04-14Rollup merge of #110110 - lukas-code:display-panic-info, r=JohnTitorMatthias Krüger-6/+2
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.
2023-04-14Rollup merge of #109947 - clubby789:cmp-macro-crosslink, r=JohnTitorMatthias Krüger-4/+7
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
2023-04-14Rollup merge of #110269 - scottmcm:sort-features, r=jyn514Yuki Okushi-22/+28
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.
2023-04-14Auto merge of #101959 - Xaeroxe:clamp-better-assert, r=ChrisDentonbors-2/+2
Add better assert messages for f32/f64 clamps
2023-04-14Rollup merge of #110158 - TDecking:obsolete_test, r=ChrisDentonMatthias Krüger-11/+0
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.
2023-04-14Rollup merge of #109800 - bryangarza:safe-transmute-improved-errors, ↵Matthias Krüger-4/+0
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.
2023-04-13Improve safe transmute error reportingBryan Garza-4/+0
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.
2023-04-13Rollup merge of #110259 - ndrewxie:issue-109964-fix-gitstuff, r=cjgillotMatthias Krüger-1/+1
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
2023-04-13Rollup merge of #110233 - nbdd0121:intrinsic, r=tmiaskoMatthias Krüger-1/+235
Make rust-intrinsic ABI unwindable Fix #104451, fix https://github.com/rust-lang/miri/issues/2839 r? `@RalfJung`
2023-04-13Document catch_fn in r#try cannot unwindGary Guo-0/+2
2023-04-13Add `tidy-alphabetical` to features in `core`Scott McMurray-22/+28
So that people have to keep them sorted in future.
2023-04-12Update unwind_safe.rsJustin Symonds-1/+1
Typo in the documentation.
2023-04-12Added diagnostic for pin! macro in addition to Box::pin if Unpin isn't ↵Andrew Xie-1/+1
implemented
2023-04-12remove some unneeded importsKaDiWa-12/+1
2023-04-12Rollup merge of #110190 - cbeuw:mir-offset, r=oli-obkMatthias Krüger-0/+2
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```
2023-04-12Make rust-intrinsic ABI unwindableGary Guo-1/+233
Stick `#[rustc_nounwind]` to all except `const_eval_select` to undo the change for all other intrinsics.
2023-04-11Rollup merge of #110104 - kormosi:todo_typo, r=cuviperMichael Goulet-2/+2
Reword the docstring in todo! macro definition, fixing a typo
2023-04-11Reword the docstring in todo! macro definitionPatrik Kormosi-2/+2
2023-04-11Add Offset binary op to custom mirAndy Wang-0/+2
2023-04-11Rollup merge of #110070 - scottmcm:wrapping-neg, r=cuviperYuki Okushi-5/+4
The `wrapping_neg` example for unsigned types shouldn't use `i8` Probably it should have at least one example with an unsigned type.
2023-04-10remove obsolete testTobias Decking-11/+0
2023-04-10Fix typos in libraryDaniPopes-3/+3
2023-04-10Auto merge of #107007 - TDecking:float_parsing_improvments, r=Mark-Simulacrumbors-288/+188
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.
2023-04-10Rollup merge of #110044 - scottmcm:more-size-of-val, r=ChrisDentonDylan DPC-12/+4
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)
2023-04-10Improve the floating point parser in `dec2flt`.Tobias Decking-288/+188
* Remove all remaining traces of unsafe. * Put `parse_8digits` inside a loop. * Rework parsing of inf/NaN values.
2023-04-09Auto merge of #109684 - fee1-dead-contrib:rv_const_range, r=Mark-Simulacrumbors-86/+16
Revert #104100, Allow using `Range` as an `Iterator` in const contexts. This fixes #109632.
2023-04-09Use `Display` in top-level example for `PanicInfo`Lukas Markeffsky-6/+2
2023-04-09Fix typo in todo! macro docstringPatrik Kormosi-1/+1