Skip to content

Rollup of 8 pull requests #140324

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 16 commits into from
Apr 26, 2025
Merged

Rollup of 8 pull requests #140324

merged 16 commits into from
Apr 26, 2025

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

m-ou-se and others added 16 commits April 15, 2025 17:29
On Windows, if creating a temporary directory fails with permission denied then use a retry/backoff loop. This hopefully fixes a recuring error in our CI.
…location, r=tgross35

Stabilize proc_macro::Span::{start,end,line,column}.

This stabilizes part of rust-lang#54725

Specifically, the part related to getting the location of a span:

```rust
impl Span {
    pub fn start(&self) -> Span; // Empty span at the start of this span
    pub fn end(&self) -> Span; // Empty span at the end of this span

    pub fn line(&self) -> usize; // Line where the span starts
    pub fn column(&self) -> usize; // Column where the span starts
}
```

History of this part of the API:

Originally, `start` and `end` returned a `LineColumn` struct (containing the line and column).

This has been simplified/changed:

- No more `LineColumn`: `Span` now directly has `.line()` and `.column()` methods. This means we can easily add `.byte_offset()` or `.byte_range()` in the future if we want to.
- `Span::start()` and `Span::end()` are now the equivalent of rustc's internal `shrink_to_lo()` and `shrink_to_hi()`. This means you can do e.g. `span.end().column()`, removing the need for a `span.end_column()` or similar.
If creating a temporary directory fails with permission denied then retry with backoff

On Windows, if creating a temporary directory fails with permission denied then use a retry/backoff loop. This hopefully fixes a recuring error in our CI.

cc ```@jieyouxu,``` rust-lang#133959
Document that "extern blocks must be unsafe" in Rust 2024

The [documentation on `extern`](https://doc.rust-lang.org/std/keyword.extern.html) contains the following code sample:
```rust
#[link(name = "my_c_library")]
extern "C" {
    fn my_c_function(x: i32) -> bool;
}
```

Due to rust-lang#123743, attempting to compile such code with the 2024 edition of Rust fails:
```
error: extern blocks must be unsafe
```

This PR extends the `extern` documentation with a brief explanation of the new requirement. It also adds the missing `unsafe` keyword to the code sample, which should be compatible with rustc since v1.82.

**Related docs:**
- https://doc.rust-lang.org/reference/items/external-blocks.html
- https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-extern.html
…ter, r=cuviper

Add XtensaAsmPrinter

See rust-lang#133601. The PR was closed because it required LLVM 19 in CI added with (rust-lang@12167d7)
Improve error message for `||` (or) in let chains

**Description**

This PR improves the error message when using `||` in an if let chain expression, addressing rust-lang#140263.

**Changes**

1. Creates a dedicated error message specifically for `||` usage in let chains
2. Points the primary span directly at the `||` operator
3. Removes confusing secondary notes about "let statements" and unsupported contexts
5. Adds UI tests verifying the new error message and valid cases

**Before**
```rust
error: expected expression, found let statement
 --> src/main.rs:2:8
  |
2 |     if let true = true || false {}
  |        ^^^^^^^^^^^^^^^
  |
  = note: only supported directly in conditions of if and while expressions
note: || operators are not supported in let chain expressions
 --> src/main.rs:2:24
  |
2 |     if let true = true || false {}
  |
```

**After**
```rust
error: `||` operators are not supported in let chain conditions
 --> src/main.rs:2:24
  |
2 |     if let true = true || false {}
  |                        ^^
```

**Implementation details**
1. Added new `OrInLetChain` diagnostic in errors.rs

2. Modified `CondChecker` in expr.rs to prioritize the `||` error

3. Updated fluent message definitions to use clearer wording

**Related issue**
Fixes rust-lang#140263

cc ```@ehuss``` (issue author)
Track per-obligation recursion depth only if there is inference in the new solver

Track how many times an obligation has been processed in the fulfillment context by reusing its recursion depth, and only overflow if a singular (root) goal hits the limit.

This also fixes a (probably theoretical at this point) problem where we don't detect pseudo-hangs across `select_where_possible` calls.

fixes rust-lang/trait-system-refactor-initiative#186

r? lcnr
…r-errors

handle specialization in the new trait solver

fixes rust-lang/trait-system-refactor-initiative#187
also fixes the regression in `plonky2_field` from rust-lang/trait-system-refactor-initiative#188

cc rust-lang#111994

r? ```@compiler-errors```
stall generator witness obligations: add regression test

fixes rust-lang/trait-system-refactor-initiative#180

r? ```@compiler-errors```
@rustbot rustbot added 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels Apr 26, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Apr 26, 2025

📌 Commit c781c9a 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 Apr 26, 2025
@bors
Copy link
Collaborator

bors commented Apr 26, 2025

⌛ Testing commit c781c9a with merge 5ae50d3...

@bors
Copy link
Collaborator

bors commented Apr 26, 2025

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 5ae50d3 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 26, 2025
@bors bors merged commit 5ae50d3 into rust-lang:master Apr 26, 2025
7 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Apr 26, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#139865 Stabilize proc_macro::Span::{start,end,line,column}. 19499dfba07f91ddd7902128cbe865bcbc504164 (link)
#140086 If creating a temporary directory fails with permission den… ddf398033b1220d917d8e3ccfe75e8a7ada395b4 (link)
#140216 Document that "extern blocks must be unsafe" in Rust 2024 3b9130327093d52c998d4b30fd5652858bbb4c78 (link)
#140253 Add XtensaAsmPrinter 9cd49d7d234d8ae4e9f0cac4e4f08266d6357ff7 (link)
#140272 Improve error message for || (or) in let chains 2f860799b735a17b5253cca8563cb36be9d9b49b (link)
#140305 Track per-obligation recursion depth only if there is infer… 2934d53b0c9e78a625fc7407e45b9346ef50f587 (link)
#140306 handle specialization in the new trait solver 3efb55ff1bf73cafd80d80633cb6fcb9471ace52 (link)
#140308 stall generator witness obligations: add regression test 9306e79aad07d702752e710995c2b07885d5ac24 (link)

previous master: d3508a8ad0

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

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 d3508a8 (parent) -> 5ae50d3 (this PR)

Test differences

Show 653 test diffs

Stage 1

  • errors::verify_parse_assignment_else_not_allowed_39: pass -> [missing] (J0)
  • errors::verify_parse_async_impl_159: pass -> [missing] (J0)
  • errors::verify_parse_async_impl_160: [missing] -> pass (J0)
  • errors::verify_parse_async_move_order_incorrect_51: pass -> [missing] (J0)
  • errors::verify_parse_async_use_order_incorrect_52: pass -> [missing] (J0)
  • errors::verify_parse_attr_without_generics_133: [missing] -> pass (J0)
  • errors::verify_parse_attribute_on_param_type_47: pass -> [missing] (J0)
  • errors::verify_parse_attribute_on_param_type_48: [missing] -> pass (J0)
  • errors::verify_parse_bad_assoc_type_bounds_130: pass -> [missing] (J0)
  • errors::verify_parse_bad_item_kind_143: [missing] -> pass (J0)
  • errors::verify_parse_bad_return_type_notation_output_130: [missing] -> pass (J0)
  • errors::verify_parse_binder_and_polarity_164: pass -> [missing] (J0)
  • errors::verify_parse_binder_before_modifiers_164: [missing] -> pass (J0)
  • errors::verify_parse_bounds_not_allowed_on_trait_aliases_72: pass -> [missing] (J0)
  • errors::verify_parse_cannot_be_raw_ident_93: pass -> [missing] (J0)
  • errors::verify_parse_cannot_be_raw_ident_94: [missing] -> pass (J0)
  • errors::verify_parse_cannot_be_raw_lifetime_95: [missing] -> pass (J0)
  • errors::verify_parse_catch_after_try_24: pass -> [missing] (J0)
  • errors::verify_parse_colon_as_semi_59: pass -> [missing] (J0)
  • errors::verify_parse_colon_as_semi_60: [missing] -> pass (J0)
  • errors::verify_parse_comma_after_base_struct_25: pass -> [missing] (J0)
  • errors::verify_parse_comma_after_base_struct_26: [missing] -> pass (J0)
  • errors::verify_parse_compound_assignment_expression_in_let_44: [missing] -> pass (J0)
  • errors::verify_parse_const_let_mutually_exclusive_43: [missing] -> pass (J0)
  • errors::verify_parse_doc_comment_does_not_document_anything_42: [missing] -> pass (J0)
  • errors::verify_parse_dot_dot_dot_range_to_pattern_not_allowed_113: pass -> [missing] (J0)
  • errors::verify_parse_dyn_after_mut_124: pass -> [missing] (J0)
  • errors::verify_parse_enum_pattern_instead_of_identifier_115: [missing] -> pass (J0)
  • errors::verify_parse_expected_binding_left_of_at_109: [missing] -> pass (J0)
  • errors::verify_parse_expected_comma_after_pattern_field_119: [missing] -> pass (J0)
  • errors::verify_parse_expected_else_block_19: [missing] -> pass (J0)
  • errors::verify_parse_expected_fn_path_found_fn_keyword_56: pass -> [missing] (J0)
  • errors::verify_parse_expected_struct_field_20: [missing] -> pass (J0)
  • errors::verify_parse_expr_rarrow_call_160: pass -> [missing] (J0)
  • errors::verify_parse_extra_impl_keyword_in_trait_impl_71: pass -> [missing] (J0)
  • errors::verify_parse_fn_pointer_cannot_be_const_126: [missing] -> pass (J0)
  • errors::verify_parse_generic_args_in_pat_require_turbofish_syntax_157: [missing] -> pass (J0)
  • errors::verify_parse_generics_in_path_134: pass -> [missing] (J0)
  • errors::verify_parse_inclusive_range_match_arrow_33: pass -> [missing] (J0)
  • errors::verify_parse_inclusive_range_match_arrow_34: [missing] -> pass (J0)
  • errors::verify_parse_incorrect_visibility_restriction_38: pass -> [missing] (J0)
  • errors::verify_parse_invalid_attr_unsafe_162: pass -> [missing] (J0)
  • errors::verify_parse_invalid_attr_unsafe_163: [missing] -> pass (J0)
  • errors::verify_parse_invalid_digit_literal_99: pass -> [missing] (J0)
  • errors::verify_parse_invalid_dyn_keyword_129: [missing] -> pass (J0)
  • errors::verify_parse_invalid_offset_of_158: pass -> [missing] (J0)
  • errors::verify_parse_invalid_offset_of_159: [missing] -> pass (J0)
  • errors::verify_parse_keyword_lifetime_95: pass -> [missing] (J0)
  • errors::verify_parse_keyword_lifetime_96: [missing] -> pass (J0)
  • errors::verify_parse_left_arrow_operator_29: [missing] -> pass (J0)
  • errors::verify_parse_loop_else_22: pass -> [missing] (J0)
  • errors::verify_parse_macro_invocation_visibility_146: pass -> [missing] (J0)
  • errors::verify_parse_macro_name_remove_bang_144: pass -> [missing] (J0)
  • errors::verify_parse_macro_name_remove_bang_145: [missing] -> pass (J0)
  • errors::verify_parse_maybe_fn_typo_with_impl_56: [missing] -> pass (J0)
  • errors::verify_parse_mismatched_closing_delimiter_38: [missing] -> pass (J0)
  • errors::verify_parse_missing_expression_in_for_loop_22: [missing] -> pass (J0)
  • errors::verify_parse_missing_fn_params_67: [missing] -> pass (J0)
  • errors::verify_parse_missing_for_in_trait_impl_69: pass -> [missing] (J0)
  • errors::verify_parse_missing_trait_in_trait_impl_68: pass -> [missing] (J0)
  • errors::verify_parse_missing_trait_in_trait_impl_69: [missing] -> pass (J0)
  • errors::verify_parse_modifier_lifetime_136: pass -> [missing] (J0)
  • errors::verify_parse_modifiers_and_polarity_165: pass -> [missing] (J0)
  • errors::verify_parse_nested_adt_147: pass -> [missing] (J0)
  • errors::verify_parse_nested_c_variadic_type_127: pass -> [missing] (J0)
  • errors::verify_parse_no_digits_literal_99: [missing] -> pass (J0)
  • errors::verify_parse_nonterminal_expected_item_keyword_89: pass -> [missing] (J0)
  • errors::verify_parse_outer_attribute_not_allowed_on_if_else_20: pass -> [missing] (J0)
  • errors::verify_parse_remove_let_29: pass -> [missing] (J0)
  • errors::verify_parse_repeated_mut_in_pattern_112: pass -> [missing] (J0)
  • errors::verify_parse_return_types_use_thin_arrow_120: pass -> [missing] (J0)
  • errors::verify_parse_self_param_not_first_50: [missing] -> pass (J0)
  • errors::verify_parse_single_colon_import_path_142: [missing] -> pass (J0)
  • errors::verify_parse_suffixed_literal_in_attribute_45: [missing] -> pass (J0)
  • errors::verify_parse_too_many_hashes_103: [missing] -> pass (J0)
  • errors::verify_parse_trailing_vert_not_allowed_105: pass -> [missing] (J0)
  • errors::verify_parse_trailing_vert_not_allowed_106: [missing] -> pass (J0)
  • errors::verify_parse_trait_alias_cannot_be_auto_74: [missing] -> pass (J0)
  • errors::verify_parse_trait_alias_cannot_be_unsafe_75: [missing] -> pass (J0)
  • errors::verify_parse_unexpected_const_in_generic_param_51: [missing] -> pass (J0)
  • errors::verify_parse_unexpected_self_in_generic_parameters_86: pass -> [missing] (J0)
  • errors::verify_parse_unexpected_self_in_generic_parameters_87: [missing] -> pass (J0)
  • errors::verify_parse_unexpected_token_after_dot_63: pass -> [missing] (J0)
  • errors::verify_parse_unexpected_token_after_dot_64: [missing] -> pass (J0)
  • errors::verify_parse_unexpected_token_after_struct_name_found_doc_comment_84: [missing] -> pass (J0)
  • errors::verify_parse_unexpected_token_after_struct_name_found_metavar_85: [missing] -> pass (J0)
  • errors::verify_parse_unexpected_token_after_struct_name_found_other_85: pass -> [missing] (J0)
  • errors::verify_parse_unexpected_vert_vert_in_pattern_104: pass -> [missing] (J0)
  • errors::verify_parse_unexpected_vert_vert_in_pattern_105: [missing] -> pass (J0)
  • errors::verify_parse_unknown_builtin_construct_153: pass -> [missing] (J0)
  • errors::verify_parse_unmatched_angle_150: [missing] -> pass (J0)
  • errors::verify_parse_where_generics_133: pass -> [missing] (J0)
  • [ui] tests/ui/parser/or-in-let-chain.rs#edition2024: [missing] -> pass (J1)
  • [ui] tests/ui/specialization/specialization-default-projection.rs#next: [missing] -> pass (J1)
  • [ui] tests/ui/specialization/specialization-default-types.rs#current: [missing] -> pass (J1)
  • [ui] tests/ui/specialization/specialization-default-types.rs#next: [missing] -> pass (J1)
  • [ui] tests/ui/traits/next-solver/coerce-depth.rs: [missing] -> pass (J1)

Stage 2

  • [ui] tests/ui/coroutine/dont-drop-stalled-generators.rs#next: [missing] -> pass (J2)
  • [ui] tests/ui/parser/or-in-let-chain.rs#edition2024: [missing] -> pass (J2)
  • [ui] tests/ui/specialization/specialization-default-projection.rs#next: [missing] -> pass (J2)

(and 223 additional test diffs)

Additionally, 330 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 5ae50d3b2182f81eea4e4d90e8da3653547215b5 --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. dist-x86_64-apple: 10367.2s -> 7086.1s (-31.6%)
  2. x86_64-apple-1: 9612.9s -> 7310.3s (-24.0%)
  3. dist-apple-various: 8329.2s -> 6904.5s (-17.1%)
  4. x86_64-apple-2: 6082.0s -> 5055.8s (-16.9%)
  5. dist-aarch64-apple: 5104.4s -> 5530.6s (8.3%)
  6. dist-i686-mingw: 8662.1s -> 7958.5s (-8.1%)
  7. dist-powerpc64-linux: 5548.0s -> 5186.4s (-6.5%)
  8. x86_64-msvc-2: 7130.6s -> 6792.3s (-4.7%)
  9. dist-x86_64-msvc-alt: 7216.2s -> 7547.2s (4.6%)
  10. i686-msvc-1: 9157.3s -> 9567.7s (4.5%)
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

Finished benchmarking commit (5ae50d3): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

Max RSS (memory usage)

Results (primary 2.5%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
3.2% [0.5%, 9.7%] 4
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.5% [-0.5%, -0.5%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.5% [-0.5%, 9.7%] 5

Cycles

Results (primary 0.5%, secondary 2.5%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

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

Binary size

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

Bootstrap: 775.41s -> 776.211s (0.10%)
Artifact size: 365.09 MiB -> 365.21 MiB (0.03%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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-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. 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.