Repository navigation
Rollup of 7 pull requests - #165454
Closed
JonathanBrouwer wants to merge 19 commits into
Closed
Rollup of 7 pull requests#165454JonathanBrouwer wants to merge 19 commits into
JonathanBrouwer wants to merge 19 commits into
Conversation
Method to get a ordering key on `Discriminant`
Based on reviewer feedback.
…ation, r=lqd,bjorn3 Apply the Cortex-A53 843419 CC mitigation to aarch64 targets This PR sets out a strategy for more consistently applying the mitigation for Cortex A53 Errata 843419 to aarch64 targets. See rust-lang#118095 for more detailed background information on the mitigation itself. In the last stable release rust-lang#155453 applied the linker flag for this mitigation (`--fix-cortex-a53-843419`) to aarch64 linux gnu & musl targets, but this raised two bugs: - rust-lang#161486 - old versions of LD (before 2.26 in 2016 I believe) do not support the mitigation and this form of the flag cannot be disabled. The LD version requirement was not detailed in the release notes. - rust-lang#164275 - large build time regression. When LD [is patched](https://inbox.sourceware.org/binutils/20260806054354.27168-1-ktkachov@nvidia.com/) to allow disabling the mitigation, having the mitigation enabled results in a large regression in link time. This is particularly bad for large Rust projects (+327% debug build time for deno) as Rust defaults to `-Zfunction-sections=yes` for most targets, while Clang defaults to -`fno-function-sections`. Again, the mitigation cannot be disabled. This PR does a few things to fix those: - Apply the mitigation by default for all aarch64 targets when using a CC linker driver - Applying the linker driver variant of the flag `-mfix-cortex-a53-843419`, which can be overridden with `-mno-fix-cortex-a53-843419` - Attempt an automatic linking retry without the mitigation when the linker or linker driver reports that it isn't aware of the flag. This is particularly an issue with Clang which only [added the mitigation control flag](llvm/llvm-project#143915) in v21. If a target wishes it can force the mitigation enabled with the linker version of the flag, as [fuchsia](https://github.com/rust-lang/rust/blob/afe686de2708699b69dd31ed14be326f4e95edfc/compiler/rustc_target/src/spec/targets/aarch64_unknown_fuchsia.rs#L24), [nuttx](https://github.com/rust-lang/rust/blob/afe686de2708699b69dd31ed14be326f4e95edfc/compiler/rustc_target/src/spec/targets/aarch64_unknown_nuttx.rs#L21) and the [bare-metal target](https://github.com/rust-lang/rust/blob/afe686de2708699b69dd31ed14be326f4e95edfc/compiler/rustc_target/src/spec/targets/aarch64_unknown_none.rs#L21) do, though this limits the versions of LD that can be used. As mentioned above in the reproduction guide in rust-lang#164275 this mitigation results in a large build time regression for rustc crates with more than 128MiB. I haven't reproduced the findings, but the repo does contain a setup for running all the benchmarks detailed. For many users this change won't have an effect as the mitigation is forced on anyway by unpatched versions of LD, or builds of GCC which enable the mitigation (Debian's GCC does this). For users this PR does affect, switching the target to LLD I expect would significantly reduce this compile time regression. An interesting footnote, Clang does not enable this mitigation by default at all for Linux targets, but does for Android. r? @lqd
…gate, r=JonathanBrouwer Add `Forget` trait feature gate r? jonathanbrouwer Add an unstable feature gate for the `Forget` trait. Creating the feature gate allows experimentation with its implementation. Note that this does not commit to anything w.r.t. stabilization of the forget trait. A feature gate can be removed at any time. Part of rust-lang#165370
…anBrouwer
Revert FCW on lint attributes on macro calls
In porting the lint attributes, it also added a fcw if they're used on a macro invocation. However t is something that has meaning, so revert the FCW.
```rust
// edition ..2021
macro_rules! wat {
($($tt:tt)*) => {}
}
fn main(){
#[deny(keyword_idents_2024)]
wat!(gen);
//~^ ERROR `gen` is a keyword in the 2024 edition
//~| WARN this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2024!
}
```
So I don't think this should be a fcw.
Similarly, clippy currently does this:
```rust
fn main() {
#[deny(clippy::nonstandard_macro_braces)]
println! {};
}
```
```rust
error: use of irregular braces for `println!` macro
--> src/main.rs:3:5
|
3 | println! {};
| ^^^^^^^^^^^ help: consider writing: `println!()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/main/index.html#nonstandard_macro_braces
note: the lint level is defined here
--> src/main.rs:2:12
|
2 | #[deny(clippy::nonstandard_macro_braces)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: the `deny` attribute cannot be used on macro calls
--> src/main.rs:2:7
|
2 | #[deny(clippy::nonstandard_macro_braces)]
| ^^^^
3 | println! {};
|
= help: the `deny` attribute can be applied to associated consts, associated types, break expressions, const parameters, constants, crates, data types, enum variants, extern crates, for loops, foreign modules, foreign statics, function params, functions, global asms, impl blocks, lifetime parameters, loops, macro defs, match arms, modules, pattern fields, statics, struct fields, trait aliases, traits, type aliases, type parameters, use statements, and while loops
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: placing this attribute on a macro invocation does nothing even if the macro expands to what would be a valid target for the attribute
= note: `#[warn(unused_attributes)]` (part of `#[warn(unused)]`) on by default
```
Update books ## rust-lang/book 1 commits in 1500248d8f230566e4ec9f27fcbb8fe9e2898ab1..2771df165f092a4fbb9f46b5b2e7450f19010adb 2026-10-28 18:58:38 UTC to 2026-10-28 18:58:38 UTC - Upgrade to rust 1.99.1 (rust-lang/book#4861) ## rust-embedded/book 1 commits in 0789b0f29e73ecb91213cac10ad0eec1b9333770..637b4a0244e16ec391a60184ae0c86b550ffc24b 2026-10-27 19:19:19 UTC to 2026-10-27 19:19:19 UTC - Replace cty:: with core::ffi:: (rust-embedded/book#422) ## rust-lang/reference 1 commits in 2dafab96d919d6ab2884488e970bf95610ff83eb..3989fe91f1a601b51684a582ad17b2503f221787 2026-10-20 21:23:48 UTC to 2026-10-20 21:23:48 UTC - Add documentation for `MaybeUninit<T>` (rust-lang/reference#2393)
…kruppe Update amdgpu datalayout for LLVM 24 It changed in llvm/llvm-project#209746
…clarfonthey Add `Discriminant::ord` ACP: rust-lang/libs-team#925 Tracking Issue: rust-lang#165438 Alternative To: rust-lang#164231 This is an implementation for Option 2 from rust-lang#165438. This provides a new method `Discriminant::ord` which returns a new type, `DiscriminantOrd`, suitable for key comparison. This follows a philosophy similar to that of `Path::display` for providing functional through standard traits gated behind a wrapper. I've elected for the return type of `Discriminant::ord` to be named as was requested during the T-Libs meeting proposing this option, and I've chosen to implement all traits currently implemented by `Discriminant`, this could be reduced. In comparison to rust-lang#164231, this has the advantage of allowing the storage of the discriminant in a structure and the deriving a `Partial/Ord` implementation. # Notes * No AI tooling of any kind was used during the creation of this PR. * Chose the name `ord` as that appeared to be the generally preferred option, but alternatives may include `unstable_ord`, etc.
Add an unstable option to increase the chain depth of the next solver overflow FCW This will help us debug the causes of overflows. See rust-lang#159228 (comment) r? @ShoyuVanilla
Member
Author
Contributor
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 4, 2026
Rollup of 7 pull requests try-job: dist-various-1 try-job: test-various try-job: test-x86_64-gnu-aux try-job: test-x86_64-msvc-1 try-job: test-aarch64-apple-1 try-job: test-aarch64-apple-2 try-job: test-x86_64-mingw-1 try-job: test-i686-msvc try-job: test-armhf-gnu try-job: test-x86_64-gnu-llvm-22-3 try-job: test-aarch64-msvc-2
This comment has been minimized.
This comment has been minimized.
Contributor
Contributor
|
⌛ Testing commit dc0c9bd with merge f1c7f70... Workflow: https://github.com/rust-lang/rust/actions/runs/41867048071 |
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 4, 2026
…uwer Rollup of 7 pull requests Successful merges: - #164752 (Apply the Cortex-A53 843419 CC mitigation to aarch64 targets ) - #165376 (Add `Forget` trait feature gate) - #165257 (Revert FCW on lint attributes on macro calls) - #165364 (Update books) - #165424 (Update amdgpu datalayout for LLVM 24) - #165443 (Add `Discriminant::ord`) - #165445 (Add an unstable option to increase the chain depth of the next solver overflow FCW)
Contributor
|
This pull request was unapproved due to being closed. Auto build was cancelled due to the PR being closed. Cancelled workflows: |
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.
Successful merges:
Forgettrait feature gate #165376 (AddForgettrait feature gate)Discriminant::ord#165443 (AddDiscriminant::ord)r? @ghost
Create a similar rollup