Skip to content

Rollup of 15 pull requests #145020

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

Merged
merged 34 commits into from
Aug 7, 2025
Merged

Conversation

GuillaumeGomez
Copy link
Member

@GuillaumeGomez GuillaumeGomez commented Aug 6, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Kivooeo and others added 30 commits August 3, 2025 22:56
…r-errors

Parser: Recover from attributes applied to types and generic args

r? compiler

Add clearer error messages for invalid attribute usage in types or generic types

fixes rust-lang#135017
fixes rust-lang#144132
…szelmann

Port `#[coroutine]` to the new attribute system

Related to rust-lang#131229 (comment).

r? `````@jdonszelmann`````
…er, r=WaffleLapkin

Anonymize binders in tail call sig

See the comment for explanation

Fixes rust-lang#144826

r? WaffleLapkin
…on, r=ChrisDenton

Stabilize `panic_payload_as_str` feature

Closes [tracking issue](rust-lang#125175).

Part of rust-lang#116005.

FCP ended more than year ago in tracking issue, I'm not sure if we should rerun it.
…ifetimes, r=lcnr

Enforce tail call type is related to body return type in borrowck

Like all call terminators, tail call terminators instantiate the binder of the callee signature with region variables and equate the arg operand types with that signature's args to ensure that the call is valid.

However, unlike normal call terminators, we were forgetting to also relate the return type of the call terminator to anything. In the case of tail call terminators, the correct thing is to relate it to the return type of the caller function (or in other words, the return local `_0`).

This meant that if the caller's return type had some lifetime constraint, then that constraint wouldn't flow through the signature and affect the args.

This is what's happening in the example test I committed:

```rust
fn link(x: &str) -> &'static str {
    become passthrough(x);
}

fn passthrough<T>(t: T) -> T { t }

fn main() {
    let x = String::from("hello, world");
    let s = link(&x);
    drop(x);
    println!("{s}");
}
```

Specifically, the type `x` is `'?0 str`, where `'?0` is some *universal* arg. The type of `passthrough` is `fn(&'?1 str) -> &'?1 str`. Equating the args sets `'?0 = '?1`. However, we need to also equate the return type `&'?1 str` to `&'static str` so that we eventually require that `'?0 = 'static`, which is a borrowck error!

-----

Look at the first commit for the functional change, and the second commit is just a refactor because we don't need to pass `Option<BasicBlock>` to `check_call_dest`, but just whether or not the terminator is expected to be diverging (i.e. if the return type is `!`).

Fixes rust-lang#144916
…compiler-errors

we only merge candidates for trait and normalizes-to goals

so change `fn try_merge_responses` to `fn try_merge_candidates` and just use candidates everywhere.

Potentially slightly faster than the alternative :3

r? ``@compiler-errors`` ``@BoxyUwU``
…BoxyUwU

Gate const trait syntax

Missed this during my review of rust-lang#143879, huge apologies!
Fixes [after beta backport] rust-lang#144958.

cc ``@fee1-dead``
r? ``@BoxyUwU`` or anyone
…ink-144965, r=GuillaumeGomez

rustdoc: fix caching of intra-doc links on reexports

previously two reexports of the same item would share a set of intra-doc links, which would cause problems if they had two different links with the same text.  this was fixed by using the reexport defid as the key, if it is available.

fixes rust-lang#144965
…iplett

add code example showing that file_prefix treats dotfiles as the name of a file, not an extension

This came up in a libs-api meeting while we were reviewing rust-lang#144870
…ratt

`File::set_times`: Update documentation and example to support setting timestamps on directories

Inspired by rust-lang#123883 .
…s, r=compiler-errors

Fortify generic param default checks

* Hard-reject instead of lint-reject type param defaults in generic assoc consts (GACs) (feature: `generic_const_items`).
  * In rust-lang#113522, I explicitly handled the free const item case and forgot about the assoc const one.
  * This led rustc to assume the default of emitting the deny-by-default lint `invalid_type_param_default`.
  * GCIs are unstable, thus we're not bound by backward compat
* Hard-reject instead of lint-reject type param defaults in foreign items.
  * We already hard-reject generic params on foreign items, so this isn't a breaking change.
  * There's no reason why we need to lint-reject.
* Refactor the way we determine where generic param defaults are allowed:
  * Don't default to emitting lint `invalid_type_param_defaults` for nodes that aren't explicitly handled but instead panic.
  * This would've caught my GAC oversight from above much earlier via fuzzing
  * Prevents us from accidentally stabilizing more invalid type param defaults in the future
* Streamline the phrasing of the diagnostic
@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc 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-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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels Aug 6, 2025
@GuillaumeGomez
Copy link
Member Author

@bors r+ p=5 rollup=never

@bors
Copy link
Collaborator

bors commented Aug 6, 2025

📌 Commit d369a1f has been approved by GuillaumeGomez

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 Aug 6, 2025
@bors
Copy link
Collaborator

bors commented Aug 6, 2025

⌛ Testing commit d369a1f with merge 6bcdcc7...

@bors
Copy link
Collaborator

bors commented Aug 7, 2025

☀️ Test successful - checks-actions
Approved by: GuillaumeGomez
Pushing 6bcdcc7 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 7, 2025
@bors bors merged commit 6bcdcc7 into rust-lang:master Aug 7, 2025
11 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Aug 7, 2025
Copy link
Contributor

github-actions bot commented Aug 7, 2025

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 7d82b83 (parent) -> 6bcdcc7 (this PR)

Test differences

Show 455 test diffs

Stage 1

  • errors::verify_parse_asm_expected_other_182: pass -> [missing] (J0)
  • errors::verify_parse_asm_expected_string_literal_184: pass -> [missing] (J0)
  • errors::verify_parse_asm_expected_string_literal_187: [missing] -> pass (J0)
  • errors::verify_parse_asm_non_abi_183: pass -> [missing] (J0)
  • errors::verify_parse_asm_sym_no_path_179: pass -> [missing] (J0)
  • errors::verify_parse_asm_underscore_input_181: [missing] -> pass (J0)
  • errors::verify_parse_asm_unsupported_operand_180: [missing] -> pass (J0)
  • errors::verify_parse_async_move_block_in_2015_72: [missing] -> pass (J0)
  • errors::verify_parse_async_use_block_in_2015_70: pass -> [missing] (J0)
  • errors::verify_parse_at_dot_dot_in_struct_pattern_126: pass -> [missing] (J0)
  • errors::verify_parse_attr_after_generic_145: [missing] -> pass (J0)
  • errors::verify_parse_attribute_on_type_54: [missing] -> pass (J0)
  • errors::verify_parse_bad_assoc_type_bounds_141: pass -> [missing] (J0)
  • errors::verify_parse_bad_item_kind_153: pass -> [missing] (J0)
  • errors::verify_parse_cannot_be_raw_ident_107: [missing] -> pass (J0)
  • errors::verify_parse_cannot_be_raw_lifetime_105: pass -> [missing] (J0)
  • errors::verify_parse_colon_as_semi_71: [missing] -> pass (J0)
  • errors::verify_parse_cr_doc_comment_108: pass -> [missing] (J0)
  • errors::verify_parse_default_not_followed_by_item_78: [missing] -> pass (J0)
  • errors::verify_parse_dot_dot_dot_for_remaining_fields_128: pass -> [missing] (J0)
  • errors::verify_parse_dot_dot_dot_range_to_pattern_not_allowed_124: pass -> [missing] (J0)
  • errors::verify_parse_dot_dot_range_attribute_172: pass -> [missing] (J0)
  • errors::verify_parse_dot_dot_range_attribute_175: [missing] -> pass (J0)
  • errors::verify_parse_dotdotdot_rest_pattern_117: pass -> [missing] (J0)
  • errors::verify_parse_dotdotdot_rest_pattern_120: [missing] -> pass (J0)
  • errors::verify_parse_double_colon_in_bound_59: pass -> [missing] (J0)
  • errors::verify_parse_expected_binding_left_of_at_122: [missing] -> pass (J0)
  • errors::verify_parse_expected_builtin_ident_168: [missing] -> pass (J0)
  • errors::verify_parse_expected_mut_or_const_in_raw_pointer_type_133: pass -> [missing] (J0)
  • errors::verify_parse_expected_trait_in_trait_impl_found_type_80: pass -> [missing] (J0)
  • errors::verify_parse_expr_rarrow_call_171: pass -> [missing] (J0)
  • errors::verify_parse_extra_impl_keyword_in_trait_impl_81: pass -> [missing] (J0)
  • errors::verify_parse_fn_pointer_cannot_be_const_136: pass -> [missing] (J0)
  • errors::verify_parse_fn_pointer_cannot_be_const_139: [missing] -> pass (J0)
  • errors::verify_parse_generics_in_path_145: pass -> [missing] (J0)
  • errors::verify_parse_inappropriate_default_153: [missing] -> pass (J0)
  • errors::verify_parse_invalid_attr_unsafe_176: [missing] -> pass (J0)
  • errors::verify_parse_invalid_dyn_keyword_139: pass -> [missing] (J0)
  • errors::verify_parse_kw_bad_case_165: [missing] -> pass (J0)
  • errors::verify_parse_let_chain_pre_2024_71: pass -> [missing] (J0)
  • errors::verify_parse_lifetime_after_mut_134: pass -> [missing] (J0)
  • errors::verify_parse_lifetime_in_eq_constraint_146: pass -> [missing] (J0)
  • errors::verify_parse_macro_name_remove_bang_155: pass -> [missing] (J0)
  • errors::verify_parse_macro_rules_missing_bang_157: [missing] -> pass (J0)
  • errors::verify_parse_malformed_cfg_attr_163: pass -> [missing] (J0)
  • errors::verify_parse_malformed_cfg_attr_166: [missing] -> pass (J0)
  • errors::verify_parse_maybe_fn_typo_with_impl_64: [missing] -> pass (J0)
  • errors::verify_parse_missing_const_type_89: pass -> [missing] (J0)
  • errors::verify_parse_missing_fn_params_76: pass -> [missing] (J0)
  • errors::verify_parse_missing_fn_params_79: [missing] -> pass (J0)
  • errors::verify_parse_missing_plus_in_bounds_164: [missing] -> pass (J0)
  • errors::verify_parse_missing_trait_in_trait_impl_81: [missing] -> pass (J0)
  • errors::verify_parse_modifier_lifetime_147: pass -> [missing] (J0)
  • errors::verify_parse_multiple_where_clauses_102: [missing] -> pass (J0)
  • errors::verify_parse_multiple_where_clauses_99: pass -> [missing] (J0)
  • errors::verify_parse_mut_on_nested_ident_pattern_124: [missing] -> pass (J0)
  • errors::verify_parse_mut_on_non_ident_pattern_125: [missing] -> pass (J0)
  • errors::verify_parse_nested_adt_161: [missing] -> pass (J0)
  • errors::verify_parse_nested_c_variadic_type_141: [missing] -> pass (J0)
  • errors::verify_parse_nonterminal_expected_ident_102: pass -> [missing] (J0)
  • errors::verify_parse_nonterminal_expected_item_keyword_103: [missing] -> pass (J0)
  • errors::verify_parse_nonterminal_expected_lifetime_103: pass -> [missing] (J0)
  • errors::verify_parse_nonterminal_expected_statement_104: [missing] -> pass (J0)
  • errors::verify_parse_path_double_colon_69: [missing] -> pass (J0)
  • errors::verify_parse_path_found_attribute_in_params_65: pass -> [missing] (J0)
  • errors::verify_parse_path_found_named_params_63: pass -> [missing] (J0)
  • errors::verify_parse_path_found_named_params_66: [missing] -> pass (J0)
  • errors::verify_parse_pattern_method_param_without_body_54: pass -> [missing] (J0)
  • errors::verify_parse_pattern_on_wrong_side_of_at_121: [missing] -> pass (J0)
  • errors::verify_parse_recover_import_as_use_151: pass -> [missing] (J0)
  • errors::verify_parse_recover_import_as_use_154: [missing] -> pass (J0)
  • errors::verify_parse_repeated_mut_in_pattern_123: pass -> [missing] (J0)
  • errors::verify_parse_return_types_use_thin_arrow_134: [missing] -> pass (J0)
  • errors::verify_parse_self_param_not_first_55: pass -> [missing] (J0)
  • errors::verify_parse_single_colon_import_path_155: [missing] -> pass (J0)
  • errors::verify_parse_too_many_hashes_113: pass -> [missing] (J0)
  • errors::verify_parse_trailing_vert_not_allowed_116: pass -> [missing] (J0)
  • errors::verify_parse_trait_alias_cannot_be_auto_86: [missing] -> pass (J0)
  • errors::verify_parse_trait_alias_cannot_be_const_87: [missing] -> pass (J0)
  • errors::verify_parse_underscore_literal_suffix_148: pass -> [missing] (J0)
  • errors::verify_parse_underscore_literal_suffix_151: [missing] -> pass (J0)
  • errors::verify_parse_unexpected_const_in_generic_param_59: [missing] -> pass (J0)
  • errors::verify_parse_unexpected_if_with_if_60: pass -> [missing] (J0)
  • errors::verify_parse_unexpected_self_in_generic_parameters_100: [missing] -> pass (J0)
  • errors::verify_parse_unexpected_self_in_generic_parameters_97: pass -> [missing] (J0)
  • errors::verify_parse_unexpected_token_after_struct_name_found_doc_comment_94: pass -> [missing] (J0)
  • errors::verify_parse_unexpected_token_after_struct_name_found_doc_comment_97: [missing] -> pass (J0)
  • errors::verify_parse_unexpected_token_after_struct_name_found_keyword_95: [missing] -> pass (J0)
  • errors::verify_parse_unexpected_vert_vert_before_function_parameter_114: pass -> [missing] (J0)
  • errors::verify_parse_unknown_builtin_construct_164: pass -> [missing] (J0)
  • errors::verify_parse_visibility_not_followed_by_item_74: pass -> [missing] (J0)
  • errors::verify_parse_visibility_not_followed_by_item_77: [missing] -> pass (J0)
  • errors::verify_parse_where_generics_147: [missing] -> pass (J0)
  • [ui] tests/ui/explicit-tail-calls/higher-ranked-arg.rs: [missing] -> pass (J2)
  • [ui] tests/ui/explicit-tail-calls/ret-ty-borrowck-constraints.rs: [missing] -> pass (J2)
  • [ui] tests/ui/issues/issue-26812.rs: pass -> [missing] (J2)

Stage 2

  • [run-make] tests/run-make/rustdoc-scrape-examples-paths: [missing] -> pass (J1)
  • [ui] tests/ui/explicit-tail-calls/ret-ty-borrowck-constraints.rs: [missing] -> pass (J3)
  • [ui] tests/ui/generics/invalid-type-param-default.rs: [missing] -> pass (J3)
  • [ui] tests/ui/type/default_type_parameter_in_fn_or_impl.rs: pass -> [missing] (J3)

(and 185 additional test diffs)

Additionally, 170 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 6bcdcc73bd11568fd85f5a38b58e1eda054ad1cd --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-1: 6707.0s -> 10634.5s (58.6%)
  2. x86_64-apple-2: 3895.0s -> 5683.5s (45.9%)
  3. pr-check-2: 2244.6s -> 2773.4s (23.6%)
  4. dist-x86_64-apple: 13308.5s -> 10256.2s (-22.9%)
  5. aarch64-apple: 6037.6s -> 7102.2s (17.6%)
  6. dist-aarch64-apple: 8082.6s -> 6820.2s (-15.6%)
  7. i686-gnu-nopt-1: 7305.6s -> 8368.0s (14.5%)
  8. i686-gnu-1: 7353.2s -> 8389.3s (14.1%)
  9. x86_64-rust-for-linux: 2597.2s -> 2949.0s (13.5%)
  10. x86_64-gnu-miri: 4615.9s -> 5217.0s (13.0%)
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.

@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#144195 Parser: Recover from attributes applied to types and generi… c0a94bf2fc156e00b6b22ac4da8b47b651731c70 (link)
#144794 Port #[coroutine] to the new attribute system a24c3ac8bb25846adb6c17040b9c91175037ffae (link)
#144835 Anonymize binders in tail call sig a186edcc174be92922111f237cb1fa432be0440a (link)
#144861 Stabilize panic_payload_as_str feature 4946409a5b50276d9417b37469f1d4fda80b4922 (link)
#144917 Enforce tail call type is related to body return type in bo… d3365576f77ebcaf9c924ef4914a8b4fa5c1d903 (link)
#144948 we only merge candidates for trait and normalizes-to goals a4c1bcd7d8d159dda040fcd9b6408a074289752c (link)
#144956 Gate const trait syntax 9a02e6d17934ba129fb9cac13c041858b0f77dba (link)
#144970 rustdoc: fix caching of intra-doc links on reexports 6155242efca18e20cdc388a95ba66ebe8b1faade (link)
#144972 add code example showing that file_prefix treats dotfiles a… 033326e8b343174d8c1d6bb867256d06fc6414d1 (link)
#144975 File::set_times: Update documentation and example to supp… 529b8f0a51d69727e022dda529bef6ff6372958c (link)
#144977 Fortify generic param default checks 686035d00b354b53a4bd68f85a2ceaa2baef9252 (link)
#144996 simplifycfg: Mark as changed when start is modified in coll… c16881e7af59f7ec80805fa07d2907cde249c045 (link)
#144998 mir: Do not modify NonUse in super_projection_elem 41b645e0f5153e5342cf306f1fc74c3104e10580 (link)
#145000 Remove unneeded stage parameter when setting up stdlib Ca… c5699a903a9ee2646d5f8e6e1e352c3d2c32c525 (link)
#145008 Fix rustdoc scrape examples crash 1c5f1220e9a02d3239fab167451a2020de32f07f (link)

previous master: 7d82b83ed5

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

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (6bcdcc7): 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.2% [0.1%, 0.2%] 2
Regressions ❌
(secondary)
0.3% [0.1%, 0.7%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.0% [-0.0%, -0.0%] 1
All ❌✅ (primary) 0.2% [0.1%, 0.2%] 2

Max RSS (memory usage)

Results (primary 3.4%, secondary -5.5%)

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

mean range count
Regressions ❌
(primary)
3.4% [0.7%, 6.4%] 5
Regressions ❌
(secondary)
1.6% [1.6%, 1.6%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-7.2% [-10.2%, -2.4%] 4
All ❌✅ (primary) 3.4% [0.7%, 6.4%] 5

Cycles

Results (primary 2.5%, secondary -1.4%)

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

mean range count
Regressions ❌
(primary)
2.5% [2.5%, 2.5%] 1
Regressions ❌
(secondary)
5.5% [5.5%, 5.5%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.7% [-5.0%, -2.3%] 3
All ❌✅ (primary) 2.5% [2.5%, 2.5%] 1

Binary size

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

Bootstrap: 463.234s -> 465.172s (0.42%)
Artifact size: 377.36 MiB -> 377.40 MiB (0.01%)

@rustbot rustbot added the perf-regression Performance regression. label Aug 7, 2025
@GuillaumeGomez GuillaumeGomez deleted the rollup-5prs9kw branch August 7, 2025 08: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-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. 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-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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.