Skip to content

Rollup of 8 pull requests - #160207

Closed
JonathanBrouwer wants to merge 23 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-XhDidpn
Closed

Rollup of 8 pull requests#160207
JonathanBrouwer wants to merge 23 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-XhDidpn

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

Jules-Bertholet and others added 23 commits June 17, 2026 20:30
`item.rs` is approaching the tidy-enforced length limit, and this will
make room for new additions.
fastmod --fixed-strings '#[splat]' '#[rustc_splat]'
fastmod --fixed-strings '`splat` attribute' '`rustc_splat` attribute'
fastmod --fixed-strings '$splat$' '$rustc_splat$'
fastmod 'v0(.*)#\[rustc_splat\]' 'v0${1}#[splat]' tests/ui/splat/splat-mangling.rs
…ieyouxu

Rename splat to avoid stable name collisions

Tracking issue: rust-lang#153629

This PR renames `#[splat]` to `#[rustc_splat]`, in a mostly automated way (using `fastmod`).

The rename commands I used were:
```sh
fastmod --fixed-strings '#[splat]' '#[rustc_splat]'
fastmod --fixed-strings '`splat` attribute' '`rustc_splat` attribute'
# I'm pretty sure the symbol demangling commands are no-ops on beta
# Legacy symbol demangling
fastmod --fixed-strings '$splat$' '$rustc_splat$'
# Revert some changes that aren't in rustc_demangle yet
fastmod 'v0(.*)#\[rustc_splat\]' 'v0${1}#[splat]' tests/ui/splat/splat-mangling.rs
```

Part of rust-lang#159428

#### Backport Advice

Cherry-pick the first commit to the beta branch, then run the fastmod commands above.
I've tested this locally (with a slightly different name), and it works, see my [`splat-rename-beta` branch](https://github.com/teor2345/rust/tree/splat-rename-beta).

#### Remaining Work

rustc_demangle needs an update to the attribute name, a release, and then a version bump in rust-lang/rust. I'll do that separately. It doesn't need to be backported, because the last version bump was after beta branched.

There's also some external code that needs updates, the full list is in the ticket: rust-lang#159428 (comment)

@rustbot label +beta-nominated +A-attributes +A-macros +A-resolve +C-bug +F-splat +P-high +T-compiler
…noescape, r=Darksonn

Don't escape U+FF9E and U+FF9F in `escape_debug_ext`

The two characters `゙` U+FF9E HALFWIDTH KATAKANA VOICED SOUND MARK and `゚` U+FF9F HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK are the odd ones out when it comes to grapheme extenders, in that *graphically* they are not combining at all. See microsoft/terminal#18087 for more background on these characters.

I think this needs FCP? It affects `char::escape_debug`, and various `Debug` impls for characters and strings.

@rustbot labels T-libs-api needs-fcp A-Unicode
…nyukang

Resolve vars before calling `unnormalized_obligations`

Fixes rust-lang/rust-clippy#17439
Split function parsing out of `item.rs` to a new module.

`item.rs` is approaching the tidy-enforced length limit, and this will make room for new additions.

I have split this change out of PR rust-lang#159044 to reduce its complexity (and because this large code move quickly becomes stale).
…yukang

Add regression tests for fixed dead-code issues

Fixes rust-lang#56750 (fixed by rust-lang#142485)
Fixes rust-lang#102190 (fixed by rust-lang#102538)
Fixes rust-lang#102217 (fixed by rust-lang#102538)
Fixes rust-lang#148861 (fixed by rust-lang#154377)
tests: Remove `-Zthreads` options from tests in `ui/parallel-rustc`

The number of threads is now passed by compiletest through `--parallel-frontend-threads=N` in parallel testing runs.
If it becomes necessary, we'll be able to set a larger number of threads or iterations for the `ui/parallel-rustc` tests specifically.

r? @jieyouxu
Try to recover less from incorrectly parsed const arg

The error recovery can cause a cascade of irrelevant errors, so instead return the `PResult::Err` and let the parser fail further up in the logic.

Fix rust-lang#88416.
… r=chenyukang

Mark `Tuple` and `FnPtr` traits `#[fundamental]`

This makes it possible to write certain blanket implementations over these traits that would be impossible otherwise, at the cost of making it a breaking change to add new implementations of these traits for existing types. I doubt we plan to convert existing types into function pointers or tuples, so this seems fine.

@rustbot label F-fundamental
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jul 30, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-run-make Area: port run-make Makefiles to rmake.rs 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) labels Jul 30, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Contributor Author

@bors r+ rollup=never p=5

@rust-bors

rust-bors Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 78ff3f1 has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 30, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 30, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #159817 (Rename splat to avoid stable name collisions)
 - #158057 (Don't escape U+FF9E and U+FF9F in `escape_debug_ext`)
 - #159818 (Resolve vars before calling `unnormalized_obligations`)
 - #160040 (Split function parsing out of `item.rs` to a new module.)
 - #160044 (Add regression tests for fixed dead-code issues)
 - #160147 (tests: Remove `-Zthreads` options from tests in `ui/parallel-rustc`)
 - #160175 (Try to recover less from incorrectly parsed const arg)
 - #160181 (Mark `Tuple` and `FnPtr` traits `#[fundamental]`)
@rust-bors rust-bors Bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 30, 2026
@rust-bors

rust-bors Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 5b9c68b failed: CI. Failed job:

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)

1 error[E0782]: expected a type, found a trait
+   --> $DIR/fn-sig-cycle-ice-153391.rs:6:15
+    |
+ LL |     fn g() -> B;
+    |               ^
+    |
+ help: `B` is dyn-incompatible, use `impl B` to return an opaque type, as long as you return a single underlying type
+    |
+ LL |     fn g() -> impl B;
+    |               ++++
+ 
+ error[E0782]: expected a type, found a trait
2   --> $DIR/fn-sig-cycle-ice-153391.rs:11:23
3    |
---
- LL |     fn g() -> impl B;
-    |               ++++
- help: alternatively, you can return an owned trait object
-    |
- LL |     fn g() -> Box<dyn B>;
-    |               +++++++  +
32 
33 error: aborting due to 2 previous errors
34 

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/parallel-rustc/fn-sig-cycle-ice-153391.rs:6:15
+   --> $DIR/fn-sig-cycle-ice-153391.rs:6:15
+    |
+ LL |     fn g() -> B;
+    |               ^
+    |
+ help: `B` is dyn-incompatible, use `impl B` to return an opaque type, as long as you return a single underlying type
+    |
+ LL |     fn g() -> impl B;
+    |               ++++
+ 
+ error[E0782]: expected a type, found a trait

Compare output by lines enabled, diff by lines:
Expected contains these lines that are not in actual:
   |               +++++++  +
LL |     fn g() -> Box<dyn B>;
help: alternatively, you can return an owned trait object
help: use `impl B` to return an opaque type, as long as you return a single underlying type
Actual contains these lines that are not in expected:
help: `B` is dyn-incompatible, use `impl B` to return an opaque type, as long as you return a single underlying type

The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args parallel-rustc/fn-sig-cycle-ice-153391.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/parallel-rustc/fn-sig-cycle-ice-153391.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-Zthreads=4" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/parallel-rustc/fn-sig-cycle-ice-153391" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--edition=2024"
stdout: none
--- stderr -------------------------------
error[E0782]: expected a type, found a trait
##[error]  --> /checkout/tests/ui/parallel-rustc/fn-sig-cycle-ice-153391.rs:6:15
   |
LL |     fn g() -> B;
   |               ^
   |
help: `B` is dyn-incompatible, use `impl B` to return an opaque type, as long as you return a single underlying type
   |
LL |     fn g() -> impl B;
   |               ++++

error[E0782]: expected a type, found a trait
---
   |
   = note: `A` is dyn-incompatible, otherwise a trait object could be used
help: use a new generic type parameter, constrained by `A`
   |
LL -     fn bar(&self, x: &A);
LL +     fn bar<T: A>(&self, x: &T);
   |
help: you can also use an opaque type, but users won't be able to specify the type parameter when calling the `fn`, having to rely exclusively on type inference
   |
LL |     fn bar(&self, x: &impl A);
   |                       ++++

Important

For more information how to resolve CI failures of this job, visit this link.

@Zalathar

Copy link
Copy Markdown
Member

Is this a soft-conflict between #160147 and something else?

@rust-bors rust-bors Bot 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-review Status: Awaiting review from the assignee but also interested parties. labels Jul 30, 2026
@rust-bors

rust-bors Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

PR #160147, which is a member of this rollup, was unapproved.

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jul 30, 2026
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 rollup A PR which is a rollup 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.