| Age | Commit message (Collapse) | Author | Lines |
|
Bump boostrap compiler to new beta
Accidentally left some comments on the update cfgs commit directly xd
|
|
|
|
|
|
|
|
|
|
This commit updates the compiler-builtins crate from 0.1.123 to 0.1.125.
The changes in this update are:
* https://github.com/rust-lang/compiler-builtins/pull/682
* https://github.com/rust-lang/compiler-builtins/pull/678
* https://github.com/rust-lang/compiler-builtins/pull/685
|
|
|
|
enable -Zrandomize-layout in debug CI builds
This builds rustc/libs/tools with `-Zrandomize-layout` on *-debug CI runners.
Only a handful of tests and asserts break with that enabled, which is promising. One test was fixable, the rest is dealt with by disabling them through new cargo features or compiletest directives.
The config.toml flag `rust.randomize-layout` defaults to false, so it has to be explicitly enabled for now.
|
|
|
|
Box validity: update for new zero-sized rules
Fixes https://github.com/rust-lang/unsafe-code-guidelines/issues/529
Cc `@joshlf` `@rust-lang/opsem`
|
|
Rollup of 9 pull requests
Successful merges:
- #127474 (doc: Make block of inline Deref methods foldable)
- #129678 (Deny imports of `rustc_type_ir::inherent` outside of type ir + new trait solver)
- #129738 (`rustc_mir_transform` cleanups)
- #129793 (add extra linebreaks so rustdoc can identify the first sentence)
- #129804 (Fixed some typos in the standard library documentation/comments)
- #129837 (Actually parse stdout json, instead of using hacky contains logic.)
- #129842 (Fix LLVM ABI NAME for riscv64imac-unknown-nuttx-elf)
- #129843 (Mark myself as on vacation for triagebot)
- #129858 (Replace walk with visit so we dont skip outermost expr kind in def collector)
Failed merges:
- #129777 (Add `unreachable_pub`, round 4)
- #129868 (Remove kobzol vacation status)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Fixed some typos in the standard library documentation/comments
I spent some time to fix a few typos in `library/std` and `library/core`
|
|
Apply size optimizations to panic machinery and some cold functions
* std dependencies gimli and addr2line are now built with opt-level=s
* various panic-related methods and `#[cold]` methods are now marked `#[optimize(size)]`
Panics should be cold enough that it doesn't make sense to optimize them for speed. The only tradeoff here is if someone does a lot of backtrace captures (without panics) and printing then the opt-level change might impact their perf.
Seems to be the first use of the optimize attribute. Tracking issue #54882
|
|
|
|
Lint that warns when an elided lifetime ends up being a named lifetime
As suggested in https://github.com/rust-lang/rust/issues/48686#issuecomment-1817334575
Fixes #48686
|
|
struct sizes
|
|
|
|
Re-enable android tests/benches in alloc/core
This is basically a revert of https://github.com/rust-lang/rust/pull/73729. These tests better work on android now; it's been 4 years and we don't use dlmalloc on that target anymore.
And I've validated that they should pass now with a try-build :)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Update `compiler_builtins` to `0.1.123`
Includes https://github.com/rust-lang/compiler-builtins/pull/680 and fixes https://github.com/rust-lang/rust/issues/128386.
Fixed by not including math symbols of `compiler_builtins` into any `unix` target or `wasi`, old behavior is restored
r? tgross35
|
|
Add fmt::Debug to sync::Weak<T, A>
Currently, `sync::Weak<T>` implements `Debug`, but `sync::Weak<T, A>` does not. This appears to be an oversight, as `rc::Weak<T, A>` implements `Debug`. (Note: `sync::Weak` is the weak for `Arc`, and `rc::Weak` is the weak for `Rc`.)
This PR adds the Debug trait for `sync::Weak<T, A>`. The issue was initially brought up here: https://github.com/rust-lang/wg-allocators/issues/131
|
|
Signed-off-by: Amjad Alsharafi <26300843+Amjad50@users.noreply.github.com>
|
|
|
|
|
|
|
|
A partial stabilization that only affects:
- AllocType<T>::new_uninit
- AllocType<T>::assume_init
- AllocType<[T]>::new_uninit_slice
- AllocType<[T]>::assume_init
where "AllocType" is Box, Rc, or Arc
|
|
Removes dead code from the compiler
Detected by #128637
|
|
r=dtolnay
library: Move unstable API of new_uninit to new features
- `new_zeroed` variants move to `new_zeroed_alloc`
- the `write` fn moves to `box_uninit_write`
The remainder will be stabilized in upcoming patches, as it was decided to only stabilize `uninit*` and `assume_init`.
|
|
add Box::as_ptr and Box::as_mut_ptr methods
Unstably implements https://github.com/rust-lang/libs-team/issues/355. Tracking issue: https://github.com/rust-lang/rust/issues/129090.
r? libs-api
|
|
|
|
- `new_zeroed` variants move to `new_zeroed_alloc`
- the `write` fn moves to `box_uninit_write`
The remainder will be stabilized in upcoming patches, as
it was decided to only stabilize `uninit*` and `assume_init`.
|
|
|
|
Implement feature for lossily converting from `Vec<u8>` to `String`
- Add `String::from_utf8_lossy_owned`
- Add `FromUtf8Error::into_utf8_lossy`
|
|
Signed-off-by: Amjad Alsharafi <26300843+Amjad50@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
r=workingjubilee,compiler-errors
alloc: add ToString specialization for `&&str`
Fixes #128690
|
|
miri: make vtable addresses not globally unique
Miri currently gives vtables a unique global address. That's not actually matching reality though. So this PR enables Miri to generate different addresses for the same type-trait pair.
To avoid generating an unbounded number of `AllocId` (and consuming unbounded amounts of memory), we use the "salt" technique that we also already use for giving constants non-unique addresses: the cache is keyed on a "salt" value n top of the actually relevant key, and Miri picks a random salt (currently in the range `0..16`) each time it needs to choose an `AllocId` for one of these globals -- that means we'll get up to 16 different addresses for each vtable. The salt scheme is integrated into the global allocation deduplication logic in `tcx`, and also used for functions and string literals. (So this also fixes the problem that casting the same function to a fn ptr over and over will consume unbounded memory.)
r? `@saethlin`
Fixes https://github.com/rust-lang/miri/issues/3737
|
|
|
|
predictable
|
|
Apply "polymorphization at home" to RawVec
The idea here is to move all the logic in RawVec into functions with explicit size and alignment parameters. This should eliminate all the fussing about how tweaking RawVec code produces large swings in compile times.
This uncovered https://github.com/rust-lang/rust-clippy/issues/12979, so I've modified the relevant test in a way that tries to preserve the spirit of the test without tripping the ICE.
|
|
Rollup of 8 pull requests
Successful merges:
- #128273 (Improve `Ord` violation help)
- #128807 (run-make: explaing why fmt-write-bloat is ignore-windows)
- #128903 (rustdoc-json-types `Discriminant`: fix typo)
- #128905 (gitignore: Add Zed and Helix editors)
- #128908 (diagnostics: do not warn when a lifetime bound infers itself)
- #128909 (Fix dump-ice-to-disk for RUSTC_ICE=0 users)
- #128910 (Differentiate between methods and associated functions in diagnostics)
- #128923 ([rustdoc] Stop showing impl items for negative impls)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
r=workingjubilee
Improve `Ord` violation help
Recent experience in #128083 showed that the panic message when an Ord violation is detected by the new sort implementations can be confusing. So this PR aims to improve it, together with minor bug fixes in the doc comments for sort*, sort_unstable* and select_nth_unstable*.
Is it possible to get these changes into the 1.81 release? It doesn't change behavior and would greatly help when users encounter this panic for the first time, which they may after upgrading to 1.81.
Tagging `@orlp`
|