Skip to content

Rollup of 8 pull requests #141207

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

Closed
wants to merge 33 commits into from
Closed

Rollup of 8 pull requests #141207

wants to merge 33 commits into from

Conversation

fmease
Copy link
Member

@fmease fmease commented May 18, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

mejrs and others added 30 commits May 9, 2025 23:16
apparently it doesn't really use the asm parsing at present, so this may work?
Add per page TOC in the `rustc` book

This PR adds per page Table of Content (TOC) in the `rustc` book (to be extended in the future to our other books).

The goal is to easy the navigation inside the page by providing quick overview of the page content and our position inside that page.

That functionality is unfortunately not available natively in `mdbook`, which prompted community members to create [mdBook-pagetoc](https://github.com/JorelAli/mdBook-pagetoc/) (which this PR is heavily inspired by). It's "only" a JS file (to handle the TOC) and a CSS file (to handle the margin, colors, screen size, ...), there is no "post-processor" needed (in mdbook sense).

![image](https://github.com/user-attachments/assets/9e790bea-059d-414e-b4a5-ac8170f57e27)

Live preview at: http://urgau.rf.gd/book

r? `@jieyouxu`
…manieu,traviscross

split `asm!` parsing and validation

This PR splits `asm!` parsing and validation into two separate steps.

The parser constructs a `Vec<RawAsmArg>`, with each element corresponding to an argument to one of the `asm!` macros.
The validation then checks things like ordering of arguments or that options are not provided twice.

The motivation is rust-lang#140279, which wants to add `#[cfg(...)]` support to these arguments. This support can now be added in a straightforward way by adding an `attributes: ast::AttrVec` field to `RawAsmArg`.

An extra reason for this split is that `rustfmt` probably wants to format the assembly at some point (currently that appears to be stubbed out, and the formatting is unstable rust-lang/style-team#152).

r? `@ghost` (just want to look at CI for now)

cc `@ytmimi` we discussed asm formatting a little while ago in rust-lang/rustfmt#6526. Am I correct in assuming that `AsmArgs` does not give enough information for formatting, but that `RawAsmArgs` would (it e.g. does not join information from multiple lines). This must have been an issue before?
make `rustc_attr_parsing` less dominant in the rustc crate graph

It has/had a glob re-export of `rustc_attr_data_structures`, which is a crate much lower in the graph, and a lot of crates were using it *just* (or *mostly*) for that re-export, while they can rely on `rustc_attr_data_structures` directly.

Previous graph:
![graph_1](https://github.com/user-attachments/assets/f4a5f13c-4222-4903-b56d-28c83511fcbd)

Graph with this PR:
![graph_2](https://github.com/user-attachments/assets/1e053d9c-75cc-402b-84df-86229c98277a)

The first commit keeps the re-export, and just changes the dependency if possible. The second commit is the "breaking change" which removes the re-export, and "explicitly" adds the `rustc_attr_data_structures` dependency where needed. It also switches over some src/tools/*.

The second commit is actually a lot more involved than I expected. Please let me know if it's a better idea to back it out and just keep the first commit.
…Simulacrum

Make some `f32`/`f64` tests also run in const-context
[win][arm64] Remove 'Arm64 Hazard' undocumented MSVC option and instead disable problematic test

PR rust-lang#140758 added the undocumented `/arm64hazardfree` MSVC linker flag to work around a test failure where LLVM generated code that would trip a hazard in an outdated ARM processor.

Adding this flag caused issues with LLD, as it doesn't recognize it.

Rethinking the issue, using the undocumented flag seems like the incorrect solution: there's no guarantee that the flag won't be removed in the future, or change its meaning.

Instead, I've disabled the problematic test for Arm64 Windows and have filed a bug with the MSVC team to have the check removed: <https://developercommunity.microsoft.com/t/Remove-checking-for-and-fixing-Cortex-A/10905134>

This PR supersedes rust-lang#140977

r? `@jieyouxu`
fmease added 3 commits May 18, 2025 07:48
Enable [behind-upstream] triagebot option for rust-lang/rust

After testing in [rustc-develop-guide](rust-lang/rustc-dev-guide#2384 (comment)), we can turn on `behind-upstream` here.

Doc: https://forge.rust-lang.org/triagebot/behind-upstream.html

r? `@Urgau`
Use `crate::` prefix for root macro suggestions

Fixes rust-lang#141082

I've changed the prefix to `crate` directly, since it's compatible across all editions.
Fix Rust for Linux ping group label

Noticed in rust-lang#140966 (comment). Seems like a broken label can cause the triagebot ping message to not be issued.

See rust-lang/triagebot#1992.

`@rustbot` label: +A-rust-for-linux
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-run-make Area: port run-make Makefiles to rmake.rs A-rustc-dev-guide Area: rustc-dev-guide A-rustdoc-json Area: Rustdoc JSON backend S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. rollup A PR which is a rollup labels May 18, 2025
@fmease
Copy link
Member Author

fmease commented May 18, 2025

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented May 18, 2025

📌 Commit cf4f0ac has been approved by fmease

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 18, 2025
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-tools failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] rustc_session test:false 4.829
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `attr`
   --> compiler/rustc_middle/src/middle/stability.rs:646:24
    |
646 |                 level: attr::StabilityLevel::Unstable { reason, issue, is_soft, implied_by, .. },
    |                        ^^^^ use of unresolved module or unlinked crate `attr`
    |
    = help: if you wanted to use a crate named `attr`, use `cargo add attr` to add it to your `Cargo.toml`
note: enum `crate::query::queries::size_estimate::stability::StabilityLevel` exists but is inaccessible
   --> compiler/rustc_middle/src/middle/stability.rs:28:1
    |
28  | pub enum StabilityLevel {
    | ^^^^^^^^^^^^^^^^^^^^^^^ not accessible
help: consider importing this enum
    |
4   + use rustc_attr_data_structures::StabilityLevel;
    |
help: if you import `StabilityLevel`, refer to it directly
    |
646 -                 level: attr::StabilityLevel::Unstable { reason, issue, is_soft, implied_by, .. },
646 +                 level: StabilityLevel::Unstable { reason, issue, is_soft, implied_by, .. },
    |

   Compiling rustc_ast_passes v0.0.0 (/checkout/compiler/rustc_ast_passes)
   Compiling rustc_expand v0.0.0 (/checkout/compiler/rustc_expand)
[RUSTC-TIMING] rustc_ast_passes test:false 2.078

@fmease
Copy link
Member Author

fmease commented May 18, 2025

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 18, 2025
@fmease fmease closed this May 18, 2025
@fmease fmease deleted the rollup-n18l4jk branch May 18, 2025 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-run-make Area: port run-make Makefiles to rmake.rs A-rustc-dev-guide Area: rustc-dev-guide A-rustdoc-json Area: Rustdoc JSON backend rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging this pull request may close these issues.