Repository navigation
Rustc pull update - #2240
Merged
Merged
Rustc pull update#2240
Conversation
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`).
…alfJung Distinguish `repr(C)` ZSTs from others in ABI compatibility rules FCP: rust-lang/rust#157973 (comment) (Split out from compiler implementation in rust-lang/rust#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/rust#157973 (comment)) Fixes rust-lang/unsafe-code-guidelines#552; see also rust-lang/rust#78586, rust-lang/rust#155299. Also related to rust-lang/rust#155984. @rustbot label T-lang A-ABI needs-fcp
…they 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/rust#149780. See also discussion at the tracking issue for `immediate_abort` rust-lang/rust#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
…uwer Rollup of 9 pull requests Successful merges: - rust-lang/rust#163655 (explicitly handle tests that pass with -Znext-solver) - rust-lang/rust#159924 (Send -fno-lto when linker plugin LTO is not requested to avoid having GCC do LTO when using rustc_codegen_gcc) - rust-lang/rust#163572 (Update the minimum external LLVM to 22) - rust-lang/rust#129822 (Docs - type guarantees update) - rust-lang/rust#157973 (Distinguish `repr(C)` ZSTs from others in ABI compatibility rules) - rust-lang/rust#162332 (preserve overflow in builtin Field candidates) - rust-lang/rust#163574 (intrinsics: Rename `abort` to `abort_immediate`) - rust-lang/rust#163638 (avoid trivial `fn map_bound` validations) - rust-lang/rust#163660 (yeet compare-mode-coherence)
rustfmt subtree update Subtree update of `rustfmt` to rust-lang/rustfmt@677b954. Created using https://github.com/rust-lang/josh-sync. ### Relnotes worthy (1.101 cycle) https://github.com/rust-lang/rustfmt/pulls?q=is%3Apr+state%3Aclosed+merged%3A2026-09-22..2026-09-30 (excluding the v1.11.0 release prep PR): * rust-lang/rustfmt#7115 (config search behavior) * rust-lang/rustfmt#7095 (potentially breaking) * rust-lang/rustfmt#6396 * rust-lang/rustfmt#7152 (but that's a fix for beta-regression) ### Needs beta backport (targetting 1.100) I will make a beta-targetting cherry-pick with the following PR * rust-lang/rustfmt#7152 --- r? @ytmimi
Update LLVM submodule to latest release/23.x branch Updates to rust-lang/llvm-project#200. This includes LLVM 23.1.2, and a bunch of commits from LLVM 23.1.3 (which is yet unreleased). In particular, it includes llvm/llvm-project#224185 (llvm/llvm-project#222721), which should fix rust-lang/rust#162928. r? nikic @bors rollup=never
Optimize Cranelift with PGO Opening for perf. experiments.
This updates the rust-version file to 260f1acad9d7f70b5b56a636a9dc5a7f76150417.
Pull recent changes from https://github.com/rust-lang/rust via Josh. Previous upstream ref: rust-lang/rust@21b707e New upstream ref: rust-lang/rust@260f1ac Filtered ref: 97f8f7e Upstream diff: rust-lang/rust@21b707e...260f1ac This merge was created using https://github.com/rust-lang/josh-sync.
Collaborator
|
Thanks for the pull request, and welcome! The Rust Project has assigned @Amanieu (or someone else) to review your changes, you should hear from them (or someone else) within the next two weeks. Why was this reviewer chosen?The reviewer was selected based on:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Latest update from rustc.