Rollup of 9 pull requests - #163680
Rollup of 9 pull requests#163680
Conversation
Document layout of Saturating, similarly to Wrapping
… GCC do LTO when using rustc_codegen_gcc
Co-Authored-By: Brian Smith <brian@briansmith.org> Co-Authored-By: Ralf Jung <post@ralfj.de>
Signed-off-by: Amirhossein Akhlaghpour <m9.akhlaghpoor@gmail.com>
Signed-off-by: Amirhossein Akhlaghpour <m9.akhlaghpoor@gmail.com>
Signed-off-by: Amirhossein Akhlaghpour <m9.akhlaghpoor@gmail.com>
Co-authored-by: Rémy Rakic <remy.rakic+github@gmail.com>
Co-authored-by: Augie Fackler <augie@google.com>
The semantics of `intrinsics::abort()` are closer to what we have unstably as `abort_immediate()` than to `process::abort()` or `libc::abort()`. Rename it to make more clear that the intrinsic is more of an intentional crash with platform-specific behavior than what `libc::abort()` tries to be (i.e. raising `SIGABRT`).
explicitly handle tests that pass with -Znext-solver these are all UI tests which pass with the new solver and fail with old. Using explicit revisions here. Editing some of them to actually test what they should 😁
Send -fno-lto when linker plugin LTO is not requested to avoid having GCC do LTO when using rustc_codegen_gcc More info on [this Zulip thread](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/Add.20linker.20flag.20from.20the.20codegen/near/375045533). cc @bjorn3
Update the minimum external LLVM to 22 With this change, we'll have stable support for LLVM 22 and 23. For reference, the previous increase to LLVM 21 was rust-lang#153684. cc @rust-lang/wg-llvm @durin42 r? nikic
…update, r=clarfonthey
Docs - type guarantees update
**Content:**
- Pin::map_unchecked | Safety section update
- String::reserve, String::reserve_exact | Panic section update
- Saturating | Introduce Layout section
- Fix typos
**Questions:**
1. This proposes to update String reserve methods docs:
> Panics if the new capacity overflows [`usize`].
->
> Panics if the new capacity exceeds [`isize::MAX`] bytes.
There are a few other types that are based on Vec and offer similar reserve API (like BinaryHeap).
Should they be updated, too?
ACP: ~~rust-lang/libs-team#482 [not required]
…docs, r=RalfJung Distinguish `repr(C)` ZSTs from others in ABI compatibility rules FCP: rust-lang#157973 (comment) (Split out from compiler implementation in rust-lang#156112) Some C ABIs pass and return ZSTs by pointer. But `()` should never be returned by pointer, as it must match `void`. To account for this, we have to weaken the present guarantee of "any two types with size 0 and alignment 1 are ABI-compatible" to exclude `repr(C)`. [t-lang nomination summary comment](rust-lang#157973 (comment)) Fixes rust-lang/unsafe-code-guidelines#552; see also rust-lang#78586, rust-lang#155299. Also related to rust-lang#155984. @rustbot label T-lang A-ABI needs-fcp
…flow, r=lcnr preserve overflow in builtin Field candidates preserve overflow from the builtin Field candidate instead of treating it as `NoSolution` the Sized requirements are now evaluated inside the candidate probe and coherence correctly rejects overlapping impls when evaluation overflows. fixes rust-lang#162125
…r=clarfonthey intrinsics: Rename `abort` to `abort_immediate` The semantics of `intrinsics::abort()` are closer to what we have unstably as `abort_immediate()` than to `process::abort()` or `libc::abort()`. Rename it to make more clear that the intrinsic is more of an intentional crash with platform-specific behavior than what `libc::abort()` tries to be (i.e. raising `SIGABRT`). If desired, a new intrinsic like `abort_gracefully` could be introduced that performs platform-specific behavior. This would more cleanly unblock rust-lang#149780. See also discussion at the tracking issue for `immediate_abort` rust-lang#154601.
avoid trivial `fn map_bound` validations
when compiling `zerocopy` a lot of time is spent simply checking the bound vars in `Clause::kind` because it does
```rust
self.0.internee.map_bound(|kind| match kind {
PredicateKind::Clause(clause) => clause,
_ => unreachable!(),
})
```
let's make performance with `debug_assertions` a bit better:
`zerocopy` with `-Znext-solver`:
```
16884862 counts
( 1) 12189626 (72.2%, 72.2%): Binder::map_bound called at compiler/rustc_middle/src/ty/predicate.rs:174:25
( 2) 1853971 (11.0%, 83.2%): Binder::map_bound called at compiler/rustc_type_ir/src/binder.rs:89:14
( 3) 1443803 ( 8.6%, 91.7%): Binder::map_bound called at compiler/rustc_type_ir/src/inherent.rs:493:14
( 4) 572570 ( 3.4%, 95.1%): Binder::map_bound called at compiler/rustc_type_ir/src/predicate.rs:234:14
( 5) 272733 ( 1.6%, 96.7%): Binder::map_bound called at compiler/rustc_type_ir/src/inherent.rs:507:14
( 6) 184934 ( 1.1%, 97.8%): Binder::map_bound called at compiler/rustc_middle/src/ty/predicate.rs:523:14
( 7) 183998 ( 1.1%, 98.9%): Binder::map_bound called at compiler/rustc_type_ir/src/predicate.rs:251:14
```
`zerocopy` with `-Znext-solver=no`
```
13476410 counts
( 1) 9906183 (73.5%, 73.5%): Binder::map_bound called at compiler/rustc_middle/src/ty/predicate.rs:174:25
( 2) 2107825 (15.6%, 89.1%): Binder::map_bound called at compiler/rustc_type_ir/src/binder.rs:89:14
( 3) 376524 ( 2.8%, 91.9%): Binder::map_bound called at compiler/rustc_type_ir/src/inherent.rs:493:14
( 4) 321976 ( 2.4%, 94.3%): Binder::map_bound called at compiler/rustc_type_ir/src/predicate.rs:251:14
( 5) 262305 ( 1.9%, 96.3%): Binder::map_bound called at compiler/rustc_middle/src/ty/predicate.rs:523:14
( 6) 84143 ( 0.6%, 96.9%): Binder::map_bound called at compiler/rustc_infer/src/infer/outlives/verify.rs:49:47
( 7) 83876 ( 0.6%, 97.5%): Binder::map_bound called at compiler/rustc_infer/src/traits/mod.rs:183:24
```
compiling `std`:
```
32803629 counts
( 1) 12234204 (37.3%, 37.3%): Binder::map_bound called at compiler/rustc_type_ir/src/binder.rs:89:14
( 2) 9624749 (29.3%, 66.6%): Binder::map_bound called at compiler/rustc_middle/src/ty/predicate.rs:174:25
( 3) 3805442 (11.6%, 78.2%): Binder::map_bound called at compiler/rustc_type_ir/src/inherent.rs:493:14
( 4) 2542468 ( 7.8%, 86.0%): Binder::map_bound called at compiler/rustc_type_ir/src/predicate.rs:234:14
( 5) 1229480 ( 3.7%, 89.7%): Binder::map_bound called at compiler/rustc_middle/src/ty/predicate.rs:523:14
( 6) 1176716 ( 3.6%, 93.3%): Binder::map_bound called at compiler/rustc_type_ir/src/predicate.rs:251:14
( 7) 385823 ( 1.2%, 94.5%): Binder::map_bound called at compiler/rustc_type_ir/src/inherent.rs:507:14
```
Could spend more effort to avoid the validation in trivial `Binder::fold_with`, but that's not worth it I think.
cc https://rust-lang.zulipchat.com/#narrow/channel/364551-t-types.2Ftrait-system-refactor/topic/casual.20chat.20and.20support/near/628479010
yeet compare-mode-coherence `-Znext-solver=coherence` is stable
|
💔 Test for 1199dc5 failed: CI. Failed job:
|
|
@bors retry spurious |
This comment has been minimized.
This comment has been minimized.
|
💥 Test timed out after |
|
📣 Toolstate changed by #163680! Tested on commit b6e4b5c. 💔 nomicon on windows: test-pass → test-fail (cc @JohnTitor @traviscross). |
Tested on commit rust-lang/rust@b6e4b5c. Direct link to PR: <rust-lang/rust#163680> 💔 nomicon on windows: test-pass → test-fail (cc @JohnTitor @traviscross). 💔 nomicon on linux: test-pass → test-fail (cc @JohnTitor @traviscross).
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing e0452e2 (parent) -> b6e4b5c (this PR) Test differencesShow 2331 test diffsStage 1
Stage 2
(and 215 additional test diffs) Additionally, 2016 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard b6e4b5c4e954f26d2ac32d2fb11d92192bf905ee --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (b6e4b5c): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis perf run didn't have relevant results for this metric. Max RSS (memory usage)Results (primary -0.8%, secondary 4.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesThis perf run didn't have relevant results for this metric. Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 491.518s -> 490.028s (-0.30%) |
|
📌 Perf builds for each rolled up PR:
parent commit: e0452e266c In the case of a perf regression, run the following command with the SHAs of each PR you suspect might be the cause: |
Successful merges:
repr(C)ZSTs from others in ABI compatibility rules #157973 (Distinguishrepr(C)ZSTs from others in ABI compatibility rules)aborttoabort_immediate#163574 (intrinsics: Renameaborttoabort_immediate)fn map_boundvalidations #163638 (avoid trivialfn map_boundvalidations)r? @ghost
Create a similar rollup