Skip to content

Conversation

matthiaskrgr
Copy link
Member

@matthiaskrgr matthiaskrgr commented Jul 27, 2025

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

tgross35 and others added 19 commits July 25, 2025 17:08
This feature used to be for when Cranelift didn't support inline
assembly, but its last uses were removed in 52933e0 ("Don't disable
inline asm usage in compiler-builtins when the cranelift backend is
enabled"). and cba05a7 ("Support naked functions").

This doesn't remove the feature from the `compiler-builtins` crate, that
will be done separately in the subtree repo.
This config was added in 207de01 ("libary: Forward
compiler-builtins "asm"  and "mangled-names" feature") but it does not
appear this has ever been used. The PR adding it (RUST-78472) says that
this was exposed to help with configuration and points at the [Hermit
Cargo config], but as far as I can tell, this feature name has never
been mentioned in that repository's git history.

Thus, clean up a seemingly unneeded feature.

[Hermit Cargo config]: https://github.com/hermit-os/hermit-rs/blob/ab2b830930e6a9a98c8294997a8183feeabeda4a/.cargo/config
Signed-off-by: Jonathan Brouwer <[email protected]>
Signed-off-by: Jonathan Brouwer <[email protected]>
Signed-off-by: Jonathan Brouwer <[email protected]>
Signed-off-by: Jonathan Brouwer <[email protected]>
`rustdoc` was filling a `target_modifiers` variable, but it was not
using the result.

In turn, that means that trying to use a dependency that set a target
modifier fails.

For instance, running:

```sh
RUSTC_BOOTSTRAP=1 rustc --edition=2024 --target=aarch64-unknown-none-softfloat --sysroot=/dev/null --emit=metadata -Zfixed-x18 --crate-type rlib --crate-name core $(rustc --print sysroot)/lib/rustlib/src/rust/library/core/src/lib.rs

echo '#![allow(internal_features)]
' | RUSTC_BOOTSTRAP=1 rustdoc --edition=2021 --target=aarch64-unknown-none-softfloat --sysroot=/dev/null -Zfixed-x18 --extern core=libcore.rmeta -
```

will fail with:

```text
error: mixing `-Zfixed-x18` will cause an ABI mismatch in crate `rust_out`
  |
  = help: the `-Zfixed-x18` flag modifies the ABI so Rust crates compiled with different values of this flag cannot be used together safely
  = note: unset `-Zfixed-x18` in this crate is incompatible with `-Zfixed-x18=` in dependency `core`
  = help: set `-Zfixed-x18=` in this crate or unset `-Zfixed-x18` in `core`
  = help: if you are sure this will not cause problems, you may use `-Cunsafe-allow-abi-mismatch=fixed-x18` to silence this error
```

Thus save the targets modifiers in `Options` to then pass it to the
session options, so that eventually the diff can be performed as expected
in `report_incompatible_target_modifiers()`.

Fixes: rust-lang#144521
Signed-off-by: Miguel Ojeda <[email protected]>
…r=jdonszelmann,traviscross

Port the proc macro attributes to the new attribute parsing infrastructure

Ports `#[proc_macro]`, `#[proc_macro_attribute]`, `#[proc_macro_derive]` and `#[rustc_builtin_macro]` to the new attribute parsing infrastructure for rust-lang#131229 (comment)

I've split this PR into commits for reviewability, and left some comments to clarify things
I did 4 related attributes in one PR because they share a lot of their code and logic, and doing them separately is kind of annoying as I need to leave both the old and new parsing in place then.

r? ``@oli-obk``
cc ``@jdonszelmann``
…Amanieu

Remove `compiler-builtins-{no-asm,mangled-names}`

Remove `compiler-builtins-no-asm`

This feature used to be for when Cranelift didn't support inline
assembly, but its last uses were removed in 52933e0 ("Don't disable
inline asm usage in compiler-builtins when the cranelift backend is
enabled"). and cba05a7 ("Support naked functions").

This doesn't remove the feature from the `compiler-builtins` crate, that
will be done separately in the subtree repo.

---

Remove `compiler-builtins-mangled-names`

This config was added in 207de01 ("libary: Forward
compiler-builtins "asm"  and "mangled-names" feature") but it does not
appear this has ever been used. The PR adding it (rust-lang#78472) says that
this was exposed to help with configuration and points at the [Hermit
Cargo config], but as far as I can tell, this feature name has never
been mentioned in that repository's git history.

Thus, clean up a seemingly unneeded feature.

[Hermit Cargo config]: https://github.com/hermit-os/hermit-rs/blob/ab2b830930e6a9a98c8294997a8183feeabeda4a/.cargo/config
bump cargo_metadata

Bumps cargo_metadata. Change that required fixes is: oli-obk/cargo_metadata@e3373d0
…GuillaumeGomez

rustdoc: save target modifiers

`rustdoc` was filling a `target_modifiers` variable, but it was not using the result.

In turn, that means that trying to use a dependency that set a target modifier fails.

For instance, running:

```sh
RUSTC_BOOTSTRAP=1 rustc --edition=2024 --target=aarch64-unknown-none-softfloat --sysroot=/dev/null --emit=metadata -Zfixed-x18 --crate-type rlib --crate-name core $(rustc --print sysroot)/lib/rustlib/src/rust/library/core/src/lib.rs

echo '#![allow(internal_features)]
' | RUSTC_BOOTSTRAP=1 rustdoc --edition=2021 --target=aarch64-unknown-none-softfloat --sysroot=/dev/null -Zfixed-x18 --extern core=libcore.rmeta -
```

will fail with:

```text
error: mixing `-Zfixed-x18` will cause an ABI mismatch in crate `rust_out`
  |
  = help: the `-Zfixed-x18` flag modifies the ABI so Rust crates compiled with different values of this flag cannot be used together safely
  = note: unset `-Zfixed-x18` in this crate is incompatible with `-Zfixed-x18=` in dependency `core`
  = help: set `-Zfixed-x18=` in this crate or unset `-Zfixed-x18` in `core`
  = help: if you are sure this will not cause problems, you may use `-Cunsafe-allow-abi-mismatch=fixed-x18` to silence this error
```

Thus save the targets modifiers in `Options` to then pass it to the session options, so that eventually the diff can be performed as expected in `report_incompatible_target_modifiers()`.

Cc: ``@azhogin``
Fixes: rust-lang#144521
…compiler-errors

check_static_item: explain should_check_for_sync choices

Follow-up to rust-lang#144226.

r? ``@oli-obk``
…ler-errors

miri: for ABI mismatch errors, say which argument is the problem
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-run-make Area: port run-make Makefiles to rmake.rs A-tidy Area: The tidy tool S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-clippy Relevant to the Clippy team. 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. rollup A PR which is a rollup labels Jul 27, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Jul 27, 2025

📌 Commit d33c8f9 has been approved by matthiaskrgr

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 Jul 27, 2025
@bors
Copy link
Collaborator

bors commented Jul 28, 2025

⌛ Testing commit d33c8f9 with merge 733dab5...

@bors
Copy link
Collaborator

bors commented Jul 28, 2025

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 733dab5 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 28, 2025
@bors bors merged commit 733dab5 into rust-lang:master Jul 28, 2025
1 check passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 28, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#143607 Port the proc macro attributes to the new attribute parsing… 80af800d1e9051be75ba5e685b8968b1d6694296 (link)
#144471 Remove compiler-builtins-{no-asm,mangled-names} fa2e454480d9ce37431de057196db34ff7149489 (link)
#144495 bump cargo_metadata d8c3e6aa38642b465de4b8a5b4b446dd99614ee8 (link)
#144523 rustdoc: save target modifiers 76e2b525ac8bc7f884c654e12af232b096cd2f17 (link)
#144534 check_static_item: explain should_check_for_sync choices 187ddf3ee6f246179bf5e15c4ba80bfa929d3d59 (link)
#144535 miri: for ABI mismatch errors, say which argument is the pr… 1cc87903492ee34671b365341352f86ab8849d29 (link)

previous master: 2b5e239c6b

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

Copy link
Contributor

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 2b5e239 (parent) -> 733dab5 (this PR)

Test differences

Show 88 test diffs

Stage 1

  • errors::metavar_exprs::verify_expand_mve_extra_tokens_35: [missing] -> pass (J0)
  • errors::metavar_exprs::verify_expand_mve_extra_tokens_44: pass -> [missing] (J0)
  • errors::metavar_exprs::verify_expand_mve_missing_paren_36: [missing] -> pass (J0)
  • errors::metavar_exprs::verify_expand_mve_missing_paren_45: pass -> [missing] (J0)
  • errors::metavar_exprs::verify_expand_mve_unrecognized_expr_37: [missing] -> pass (J0)
  • errors::metavar_exprs::verify_expand_mve_unrecognized_expr_46: pass -> [missing] (J0)
  • errors::metavar_exprs::verify_expand_mve_unrecognized_var_38: [missing] -> pass (J0)
  • errors::metavar_exprs::verify_expand_mve_unrecognized_var_47: pass -> [missing] (J0)
  • errors::verify_expand_arg_not_attributes_13: pass -> [missing] (J0)
  • errors::verify_expand_attr_no_arguments_9: pass -> [missing] (J0)
  • errors::verify_expand_attribute_meta_item_15: pass -> [missing] (J0)
  • errors::verify_expand_attribute_single_word_16: pass -> [missing] (J0)
  • errors::verify_expand_attributes_wrong_form_14: pass -> [missing] (J0)
  • errors::verify_expand_cannot_be_name_of_macro_12: pass -> [missing] (J0)
  • errors::verify_expand_crate_name_in_cfg_attr_31: [missing] -> pass (J0)
  • errors::verify_expand_crate_name_in_cfg_attr_40: pass -> [missing] (J0)
  • errors::verify_expand_crate_type_in_cfg_attr_32: [missing] -> pass (J0)
  • errors::verify_expand_crate_type_in_cfg_attr_41: pass -> [missing] (J0)
  • errors::verify_expand_duplicate_matcher_binding_25: [missing] -> pass (J0)
  • errors::verify_expand_duplicate_matcher_binding_34: pass -> [missing] (J0)
  • errors::verify_expand_empty_delegation_mac_29: [missing] -> pass (J0)
  • errors::verify_expand_empty_delegation_mac_38: pass -> [missing] (J0)
  • errors::verify_expand_expected_paren_or_brace_28: [missing] -> pass (J0)
  • errors::verify_expand_expected_paren_or_brace_37: pass -> [missing] (J0)
  • errors::verify_expand_feature_not_allowed_18: pass -> [missing] (J0)
  • errors::verify_expand_feature_not_allowed_9: [missing] -> pass (J0)
  • errors::verify_expand_glob_delegation_outside_impls_30: [missing] -> pass (J0)
  • errors::verify_expand_glob_delegation_outside_impls_39: pass -> [missing] (J0)
  • errors::verify_expand_glob_delegation_traitless_qpath_33: [missing] -> pass (J0)
  • errors::verify_expand_glob_delegation_traitless_qpath_42: pass -> [missing] (J0)
  • errors::verify_expand_helper_attribute_name_invalid_17: pass -> [missing] (J0)
  • errors::verify_expand_incomplete_parse_18: [missing] -> pass (J0)
  • errors::verify_expand_incomplete_parse_27: pass -> [missing] (J0)
  • errors::verify_expand_invalid_cfg_multiple_predicates_14: [missing] -> pass (J0)
  • errors::verify_expand_invalid_cfg_multiple_predicates_23: pass -> [missing] (J0)
  • errors::verify_expand_invalid_cfg_no_parens_12: [missing] -> pass (J0)
  • errors::verify_expand_invalid_cfg_no_parens_21: pass -> [missing] (J0)
  • errors::verify_expand_invalid_cfg_no_predicate_13: [missing] -> pass (J0)
  • errors::verify_expand_invalid_cfg_no_predicate_22: pass -> [missing] (J0)
  • errors::verify_expand_invalid_cfg_predicate_literal_15: [missing] -> pass (J0)
  • errors::verify_expand_invalid_cfg_predicate_literal_24: pass -> [missing] (J0)
  • errors::verify_expand_invalid_fragment_specifier_27: [missing] -> pass (J0)
  • errors::verify_expand_invalid_fragment_specifier_36: pass -> [missing] (J0)
  • errors::verify_expand_missing_fragment_specifier_26: [missing] -> pass (J0)
  • errors::verify_expand_missing_fragment_specifier_35: pass -> [missing] (J0)
  • errors::verify_expand_module_circular_20: [missing] -> pass (J0)
  • errors::verify_expand_module_circular_29: pass -> [missing] (J0)
  • errors::verify_expand_module_file_not_found_21: [missing] -> pass (J0)
  • errors::verify_expand_module_file_not_found_30: pass -> [missing] (J0)
  • errors::verify_expand_module_multiple_candidates_22: [missing] -> pass (J0)
  • errors::verify_expand_module_multiple_candidates_31: pass -> [missing] (J0)
  • errors::verify_expand_not_a_meta_item_10: pass -> [missing] (J0)
  • errors::verify_expand_only_one_word_11: pass -> [missing] (J0)
  • errors::verify_expand_proc_macro_back_compat_34: [missing] -> pass (J0)
  • errors::verify_expand_proc_macro_back_compat_43: pass -> [missing] (J0)
  • errors::verify_expand_proc_macro_derive_tokens_24: [missing] -> pass (J0)
  • errors::verify_expand_proc_macro_derive_tokens_33: pass -> [missing] (J0)
  • errors::verify_expand_recursion_limit_reached_10: [missing] -> pass (J0)
  • errors::verify_expand_recursion_limit_reached_19: pass -> [missing] (J0)
  • errors::verify_expand_remove_expr_not_supported_11: [missing] -> pass (J0)
  • errors::verify_expand_remove_expr_not_supported_20: pass -> [missing] (J0)
  • errors::verify_expand_remove_node_not_supported_19: [missing] -> pass (J0)
  • errors::verify_expand_remove_node_not_supported_28: pass -> [missing] (J0)
  • errors::verify_expand_trace_macro_23: [missing] -> pass (J0)
  • errors::verify_expand_trace_macro_32: pass -> [missing] (J0)
  • errors::verify_expand_unsupported_key_value_17: [missing] -> pass (J0)
  • errors::verify_expand_unsupported_key_value_26: pass -> [missing] (J0)
  • errors::verify_expand_wrong_fragment_kind_16: [missing] -> pass (J0)
  • errors::verify_expand_wrong_fragment_kind_25: pass -> [missing] (J0)
  • [run-make] tests/run-make/rustdoc-target-modifiers: [missing] -> pass (J2)

Stage 2

  • [run-make] tests/run-make/rustdoc-target-modifiers: [missing] -> pass (J1)

Additionally, 17 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 733dab558992d902d6d17576de1da768094e2cf3 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-apple-2: 3601.6s -> 4738.3s (31.6%)
  2. x86_64-gnu-tools: 3317.0s -> 4261.2s (28.5%)
  3. pr-check-2: 2142.6s -> 2622.7s (22.4%)
  4. x86_64-apple-1: 6913.5s -> 8115.6s (17.4%)
  5. pr-check-1: 1535.6s -> 1778.7s (15.8%)
  6. dist-x86_64-apple: 9389.3s -> 10796.9s (15.0%)
  7. aarch64-gnu-llvm-19-2: 2201.8s -> 2515.5s (14.2%)
  8. x86_64-rust-for-linux: 2599.7s -> 2952.4s (13.6%)
  9. x86_64-gnu-llvm-19: 2498.1s -> 2808.5s (12.4%)
  10. i686-gnu-2: 5374.0s -> 6029.0s (12.2%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@bors bors mentioned this pull request Jul 28, 2025
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (733dab5): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.6% [0.2%, 1.2%] 6
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.7% [-1.0%, -0.0%] 8
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -0.7%, secondary 2.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
1.0% [0.5%, 1.4%] 2
Regressions ❌
(secondary)
4.1% [2.0%, 5.7%] 7
Improvements ✅
(primary)
-2.3% [-3.3%, -1.4%] 2
Improvements ✅
(secondary)
-2.7% [-4.3%, -1.7%] 3
All ❌✅ (primary) -0.7% [-3.3%, 1.4%] 4

Cycles

Results (primary -2.0%, secondary -0.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.8% [2.2%, 3.6%] 3
Improvements ✅
(primary)
-2.0% [-2.2%, -1.7%] 2
Improvements ✅
(secondary)
-5.4% [-7.0%, -3.7%] 2
All ❌✅ (primary) -2.0% [-2.2%, -1.7%] 2

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 467.432s -> 466.742s (-0.15%)
Artifact size: 376.83 MiB -> 376.83 MiB (0.00%)

@rustbot rustbot added the perf-regression Performance regression. label Jul 28, 2025
@lqd
Copy link
Member

lqd commented Jul 28, 2025

@rust-timer build 80af800

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (80af800): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.5% [0.2%, 1.2%] 7
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.7% [-1.0%, -0.0%] 9
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -1.6%, secondary 1.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
1.3% [1.3%, 1.3%] 1
Regressions ❌
(secondary)
4.3% [2.1%, 5.6%] 5
Improvements ✅
(primary)
-3.0% [-4.5%, -1.5%] 2
Improvements ✅
(secondary)
-2.6% [-5.5%, -1.2%] 4
All ❌✅ (primary) -1.6% [-4.5%, 1.3%] 3

Cycles

Results (primary -1.5%, secondary -2.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.3% [3.1%, 3.5%] 2
Improvements ✅
(primary)
-1.5% [-1.5%, -1.5%] 1
Improvements ✅
(secondary)
-6.9% [-8.9%, -4.2%] 3
All ❌✅ (primary) -1.5% [-1.5%, -1.5%] 1

Binary size

Results (secondary -0.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.0% [-0.0%, -0.0%] 1
All ❌✅ (primary) - - 0

Bootstrap: 467.432s -> 466.1s (-0.28%)
Artifact size: 376.83 MiB -> 376.85 MiB (0.00%)

@lqd
Copy link
Member

lqd commented Jul 28, 2025

So that's #143607. One secondary proc-macro benchmark with regressions, another one with gains. I guess the magnitude evens out...

@JonathanBrouwer
Copy link
Contributor

I haven't dived into the regression yet but it's probably caused by #143940

If it's caused by that it should be fixed in the near future

@lqd
Copy link
Member

lqd commented Jul 28, 2025

(for triagers) also: match-stress is currently noisy

image

@Mark-Simulacrum Mark-Simulacrum added perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. and removed perf-regression Performance regression. labels Jul 29, 2025
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Jul 30, 2025
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#143607 (Port the proc macro attributes to the new attribute parsing infrastructure)
 - rust-lang#144471 (Remove `compiler-builtins-{no-asm,mangled-names}`)
 - rust-lang#144495 (bump cargo_metadata)
 - rust-lang#144523 (rustdoc: save target modifiers)
 - rust-lang#144534 (check_static_item: explain should_check_for_sync choices)
 - rust-lang#144535 (miri: for ABI mismatch errors, say which argument is the problem)

Failed merges:

 - rust-lang#144536 (miri subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-run-make Area: port run-make Makefiles to rmake.rs A-tidy Area: The tidy tool merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-clippy Relevant to the Clippy team. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.