Skip to content

Rollup of 9 pull requests#157851

Closed
jhpratt wants to merge 21 commits into
rust-lang:mainfrom
jhpratt:rollup-3pfOS1S
Closed

Rollup of 9 pull requests#157851
jhpratt wants to merge 21 commits into
rust-lang:mainfrom
jhpratt:rollup-3pfOS1S

Conversation

@jhpratt

@jhpratt jhpratt commented Jun 13, 2026

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

pbkx and others added 21 commits June 11, 2026 01:13
Same as 147495, just keeping it up-to-date.
…oxyUwU

Remove AnonConstKind::GCA and reject generic anon consts

Previously, a `GCA` type const (`type const FOO<const N: usize>: usize = const { N + 1 };`) was a type-system-transparent type const whose body immediately thunked out to an opaque regular const (albeit an anon const). The fact that there was a transparent wrapper wasn't providing anything of value, now that the user can write and rust-lang#155341.

With this PR, `GCA` variant is removed from `AnonConstKind` so that generic anon consts are rejected.

Related: rust-lang/project-const-generics#113
…ggestion, r=mu001999

Avoid ICE in unconstrained generic parameter suggestion for enums

Fixes rust-lang#156701

`remove_or_use_generic` accepted structs, enums, and unions as ADT self types, but later used a local HIR lookup with `expect_struct()` when building the type-definition suggestion. That caused an ICE when the self type was an enum.
…thanBrouwer

[tiny] Use multipart suggestion for finding ident when literal was expected in attr

Minor rendering tweak.
…span, r=lolbinarycat

rustdoc: correct doctest span for trailing semicolon after item

Fixes rust-lang#157371.

When a doctest contains a trailing semicolon after an item, rustdoc can map the
resulting warning to unrelated source following the documentation block rather
than to the semicolon inside the doctest.

Changes only diagnostic span reporting.
…, r=BoxyUwU,samueltardieu

Added `PhantomPinned` diagnostic item and prevented dead field warning on `PhantomPinned`

This PR closes rust-lang#154888. See rust-lang#154978 and in [clippy#17056](rust-lang/rust-clippy#17056) for prior history on working on this issue.

From discussing with clippy team, we thought it'd be appropriate to use a diagnostic item attribute to mark `PhantomPinned` and prevent dead field warnings from being emitted in `missing_fields_in_debug.rs` and `pub_underscore_fields.rs`.

If you want me to do the clippy changes separately within the clippy repository, I can do that.
…mejrs,wesleywiser

Ensure that optimize attributes on closures are inherited by the shim.

Tracking issue: rust-lang#54882
Stabilization PR: rust-lang#157273
rustc_public: implement `ty::Alias` conversion

I don't know why there is a `todo!()` here. Am I overlooking anything?
…-ld, r=Mark-Simulacrum

Update wasm-component-ld to 0.5.25

Same as rust-lang#147495, just keeping it up-to-date.
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jun 13, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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. 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) labels Jun 13, 2026
@jhpratt

jhpratt commented Jun 13, 2026

Copy link
Copy Markdown
Member Author

@bors r+ rollup=never p=5

@rust-bors

rust-bors Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 84fb59b has been approved by jhpratt

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 Jun 13, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 13, 2026
Rollup of 9 pull requests

Successful merges:

 - #157653 (remove AliasTerm::def_id())
 - #157773 (Remove AnonConstKind::GCA and reject generic anon consts)
 - #157846 (Avoid ICE in unconstrained generic parameter suggestion for enums)
 - #157514 ([tiny] Use multipart suggestion for finding ident when literal was expected in attr)
 - #157740 (rustdoc: correct doctest span for trailing semicolon after item)
 - #157782 (Added `PhantomPinned` diagnostic item and prevented dead field warning on `PhantomPinned`)
 - #157802 (Ensure that optimize attributes on closures are inherited by the shim.)
 - #157812 (rustc_public: implement `ty::Alias` conversion)
 - #157833 (Update wasm-component-ld to 0.5.25)
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job aarch64-apple failed! Check out the build log: (web) (plain enhanced) (plain)

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

2   --> $DIR/darwin-objc-bad-arg.rs:12:18
3    |
4 LL |     objc::class!(s);
-    |                  ^ help: try adding quotation marks: `"s"`
+    |                  ^
+    |
+ help: you might have meant to write a string literal
+    |
+ LL |     objc::class!("s");
+    |                  + +
6 
7 error: attribute value must be a literal
8   --> $DIR/darwin-objc-bad-arg.rs:15:18

9    |
10 LL |     objc::class!(NSObject);
-    |                  ^^^^^^^^ help: try adding quotation marks: `"NSObject"`
+    |                  ^^^^^^^^
+    |
+ help: you might have meant to write a string literal
+    |
+ LL |     objc::class!("NSObject");
+    |                  +        +
12 
13 error: `objc::class!` expected a string literal
14   --> $DIR/darwin-objc-bad-arg.rs:18:18

---
+    |                     ^
+    |
+ help: you might have meant to write a string literal
+    |
+ LL |     objc::selector!("s");
+    |                     + +
30 
31 error: attribute value must be a literal
32   --> $DIR/darwin-objc-bad-arg.rs:28:21

33    |
34 LL |     objc::selector!(alloc);
-    |                     ^^^^^ help: try adding quotation marks: `"alloc"`
+    |                     ^^^^^
+    |
+ help: you might have meant to write a string literal
+    |
+ LL |     objc::selector!("alloc");
+    |                     +     +
36 
37 error: `objc::selector!` expected a string literal
38   --> $DIR/darwin-objc-bad-arg.rs:31:21


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 darwin-objc/darwin-objc-bad-arg.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2/bin/rustc" "/Users/runner/work/rust/rust/tests/ui/darwin-objc/darwin-objc-bad-arg.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=/Users/runner/.cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/Users/runner/work/rust/rust/vendor" "--sysroot" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2" "--target=aarch64-apple-darwin" "--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" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/darwin-objc/darwin-objc-bad-arg" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/Users/runner/work/rust/rust/build/aarch64-apple-darwin/native/rust-test-helpers" "--edition=2024"
stdout: none
--- stderr -------------------------------
error: attribute value must be a literal
##[error]  --> /Users/runner/work/rust/rust/tests/ui/darwin-objc/darwin-objc-bad-arg.rs:12:18
   |
LL |     objc::class!(s);
   |                  ^
   |
help: you might have meant to write a string literal
   |
LL |     objc::class!("s");
   |                  + +

error: attribute value must be a literal
##[error]  --> /Users/runner/work/rust/rust/tests/ui/darwin-objc/darwin-objc-bad-arg.rs:15:18
   |
LL |     objc::class!(NSObject);
   |                  ^^^^^^^^
   |
help: you might have meant to write a string literal
   |
LL |     objc::class!("NSObject");
   |                  +        +

error: `objc::class!` expected a string literal
##[error]  --> /Users/runner/work/rust/rust/tests/ui/darwin-objc/darwin-objc-bad-arg.rs:18:18
   |
LL |     objc::class!(123);
   |                  ^^^

error: `objc::class!` may not contain null characters
##[error]  --> /Users/runner/work/rust/rust/tests/ui/darwin-objc/darwin-objc-bad-arg.rs:21:18
   |
LL |     objc::class!("NSObject\0");
   |                  ^^^^^^^^^^^^

error: attribute value must be a literal
##[error]  --> /Users/runner/work/rust/rust/tests/ui/darwin-objc/darwin-objc-bad-arg.rs:25:21
   |
LL |     objc::selector!(s);
   |                     ^
   |
help: you might have meant to write a string literal
   |
LL |     objc::selector!("s");
   |                     + +

error: attribute value must be a literal
##[error]  --> /Users/runner/work/rust/rust/tests/ui/darwin-objc/darwin-objc-bad-arg.rs:28:21
   |
LL |     objc::selector!(alloc);
   |                     ^^^^^
   |
help: you might have meant to write a string literal
   |
LL |     objc::selector!("alloc");
   |                     +     +

error: `objc::selector!` expected a string literal
##[error]  --> /Users/runner/work/rust/rust/tests/ui/darwin-objc/darwin-objc-bad-arg.rs:31:21
   |
LL |     objc::selector!(123);
   |                     ^^^

error: `objc::selector!` may not contain null characters
##[error]  --> /Users/runner/work/rust/rust/tests/ui/darwin-objc/darwin-objc-bad-arg.rs:34:21
   |
LL |     objc::selector!("alloc\0");
   |                     ^^^^^^^^^

error: aborting due to 8 previous errors
------------------------------------------

@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 Jun 13, 2026
@rust-bors

rust-bors Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 7c4ce9f failed: CI. Failed job:

@rust-bors rust-bors Bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jun 13, 2026
@rust-bors

rust-bors Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

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

@rust-bors rust-bors Bot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 13, 2026
@jhpratt jhpratt closed this Jun 13, 2026
@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 Jun 13, 2026
@jhpratt jhpratt deleted the rollup-3pfOS1S branch June 13, 2026 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) rollup A PR which is a rollup 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. 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.