-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 6 pull requests #130847
Rollup of 6 pull requests #130847
Conversation
… release mode on MacOS
…pal trait def id are truly NOPs
…=spastorino,RalfJung Simple validation for unsize coercion in MIR validation This adds the most basic validity check to unsize coercions in MIR. The src and target of an unsize cast must *at least* implement `Src: CoerceUnsized<Target>` for this to be valid. This doesn't the second, more subtle validity check that is taken of advantage in codegen [here](https://github.com/rust-lang/rust/blob/914193c8f40528fe82696e1054828de8c399882e/compiler/rustc_codegen_ssa/src/base.rs#L126), but I did leave a beefy FIXME for that explaining what it is. As a consequence, this also fixes an ICE with GVN and invalid unsize coercions. This is somewhat coincidental, since MIR inlining will check that a body is valid before inlining it; so now that we determine it to be invalid, we don't inline it, and we don't encounter the GVN ICE. I'm not certain if the same GVN ICE is triggerable without the inliner, and perhaps instead with trivial where clauses or something. cc `@RalfJung`
…le_osx, r=davidtwco Fix up setting strip = true in Cargo.toml makes build scripts fail in… Fix issue: rust-lang#110536 Strip binary is PATH dependent which breaks builds in MacOS. For example, on my Mac, the output of 'which strip' is '/opt/homebrew/opt/binutils/bin/strip', which leads to incorrect 'strip' results. Therefore, just like on other systems, it is also necessary to specify 'stripcmd' on macOS. However, it seems that there is a bug in binutils [bugzilla-Bug 31571](https://sourceware.org/bugzilla/show_bug.cgi?id=31571), which leads to the problem mentioned above.
add link from random() helper fn to extensive DefaultRandomSource docs
…r=Noratrieb Add `must_use` attribute to `len_utf8` and `len_utf16`. The `len_utf8` and `len_utf16` methods in `char` should have the `must_use` attribute. The somewhat similar method `<[T]>::len` has had this attribute since rust-lang#95274. Considering that these two methods would most likely be used to test the size of a buffer (before a call to `encode_utf8` or `encode_utf16`), *not* using their return values could indicate a bug. According to ["When to add `#[must_use]`](https://std-dev-guide.rust-lang.org/policy/must-use.html), this is **not** considered a breaking change (and could be reverted again at a later time).
…ubilee fix some cfg logic around optimize_for_size and 16-bit targets Fixes rust-lang#130818. Fixes rust-lang#129910. There are still some warnings when building on a 16bit target: ``` warning: struct `AlignedStorage` is never constructed --> /home/r/src/rust/rustc.2/library/core/src/slice/sort/stable/mod.rs:135:8 | 135 | struct AlignedStorage<T, const N: usize> { | ^^^^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default warning: associated items `new` and `as_uninit_slice_mut` are never used --> /home/r/src/rust/rustc.2/library/core/src/slice/sort/stable/mod.rs:141:8 | 140 | impl<T, const N: usize> AlignedStorage<T, N> { | -------------------------------------------- associated items in this implementation 141 | fn new() -> Self { | ^^^ ... 145 | fn as_uninit_slice_mut(&mut self) -> &mut [MaybeUninit<T>] { | ^^^^^^^^^^^^^^^^^^^ warning: function `quicksort` is never used --> /home/r/src/rust/rustc.2/library/core/src/slice/sort/unstable/quicksort.rs:19:15 | 19 | pub(crate) fn quicksort<'a, T, F>( | ^^^^^^^^^ warning: `core` (lib) generated 3 warnings ``` However, the cfg stuff here is sufficiently messy that I didn't want to touch more of it. I think all `feature = "optimize_for_size"` should become `any(feature = "optimize_for_size", target_pointer_width = "16")` but I am not entirely certain. Warnings are fine, Miri will just ignore them. Cc `@Voultapher`
…s, r=jieyouxu Add tracking issue for io_error_inprogress I forgot to mention this in rust-lang#130789
@bors r+ rollup=never p=6 |
📣 Toolstate changed by #130847! Tested on commit 0399709. 💔 reference on windows: test-pass → test-fail (cc @ehuss @Havvy @matthewjasper). |
Tested on commit rust-lang/rust@0399709. Direct link to PR: <rust-lang/rust#130847> 💔 reference on windows: test-pass → test-fail (cc @ehuss @Havvy @matthewjasper). 💔 reference on linux: test-pass → test-fail (cc @ehuss @Havvy @matthewjasper).
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: b5117538e9 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (0399709): comparison URL. Overall result: ❌ regressions - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResults (primary 0.7%, secondary 2.4%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 769.756s -> 772.322s (0.33%) |
Successful merges:
must_use
attribute tolen_utf8
andlen_utf16
. #130819 (Addmust_use
attribute tolen_utf8
andlen_utf16
.)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup