Skip to content

Rollup of 3 pull requests#157403

Closed
jhpratt wants to merge 7 commits into
rust-lang:mainfrom
jhpratt:rollup-tLZDZF7
Closed

Rollup of 3 pull requests#157403
jhpratt wants to merge 7 commits into
rust-lang:mainfrom
jhpratt:rollup-tLZDZF7

Conversation

@jhpratt
Copy link
Copy Markdown
Member

@jhpratt jhpratt commented Jun 4, 2026

Successful merges:

r? @ghost

Create a similar rollup

zedddie and others added 7 commits June 3, 2026 19:33
…eyouxu

Add more tests for the `optimize` attribute

Tracking issue: rust-lang#54882
Stabilization PR: rust-lang#157273
…s, r=camelid

Fix ICE when wrong intra-doc link on type alias

Fixes rust-lang#157204.

I'm surprised this case wasn't uncovered before. Anyway, it was just a missing `Err` creation.

r? @camelid
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jun 4, 2026
@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-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jun 4, 2026
@jhpratt
Copy link
Copy Markdown
Member Author

jhpratt commented Jun 4, 2026

@bors r+ rollup=never p=5

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 4, 2026

📌 Commit 82f97b8 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 4, 2026
@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

The job aarch64-gnu-llvm-21-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- [ui] tests/ui/attributes/optimize.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/attributes/optimize/optimize.stderr`
diff of stderr:

36 LL |     #[optimize(speed)]
37    |     ^^^^^^^^^^^^^^^^^^
38    |
-    = help: `#[optimize]` can be applied to closures, functions, inherent methods, provided trait methods, and trait methods in impl blocks
+    = help: `#[optimize]` can only be applied to functions with a body
40 
---
To only update this specific test, also pass `--test-args attributes/optimize.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/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/attributes/optimize.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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-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" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/attributes/optimize" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--edition=2018"
stdout: none
--- stderr -------------------------------
error: `#[optimize]` attribute cannot be used on structs
##[error]  --> /checkout/tests/ui/attributes/optimize.rs:8:1
   |
LL | #[optimize(speed)] //~ ERROR attribute cannot be used on
   | ^^^^^^^^^^^^^^^^^^
   |
   = help: `#[optimize]` can only be applied to functions

error: `#[optimize]` attribute cannot be used on expressions
##[error]  --> /checkout/tests/ui/attributes/optimize.rs:12:5
   |
LL |     #[optimize(speed)] //~ ERROR attribute cannot be used on
   |     ^^^^^^^^^^^^^^^^^^
   |
   = help: `#[optimize]` can only be applied to functions

error: `#[optimize]` attribute cannot be used on modules
##[error]  --> /checkout/tests/ui/attributes/optimize.rs:21:1
   |
LL | #[optimize(speed)] //~ ERROR attribute cannot be used on
   | ^^^^^^^^^^^^^^^^^^
   |
   = help: `#[optimize]` can only be applied to functions

error: `#[optimize]` attribute cannot be used on inherent impl blocks
##[error]  --> /checkout/tests/ui/attributes/optimize.rs:24:1
   |
LL | #[optimize(speed)] //~ ERROR attribute cannot be used on
   | ^^^^^^^^^^^^^^^^^^
   |
   = help: `#[optimize]` can only be applied to functions

error: `#[optimize]` attribute cannot be used on required trait methods
##[error]  --> /checkout/tests/ui/attributes/optimize.rs:45:5
   |
LL |     #[optimize(speed)] //~ ERROR attribute cannot be used on
   |     ^^^^^^^^^^^^^^^^^^
   |
   = help: `#[optimize]` can only be applied to functions with a body

error: multiple `optimize` attributes
##[error]  --> /checkout/tests/ui/attributes/optimize.rs:59:1
   |
LL | #[optimize(speed)] //~ ERROR multiple `optimize` attributes
   | ^^^^^^^^^^^^^^^^^^ help: remove this attribute
   |
note: attribute also specified here
  --> /checkout/tests/ui/attributes/optimize.rs:58:1
   |
LL | #[optimize(speed)]
   | ^^^^^^^^^^^^^^^^^^

error: multiple `optimize` attributes
##[error]  --> /checkout/tests/ui/attributes/optimize.rs:63:1
   |
LL | #[optimize(size)] //~ ERROR multiple `optimize` attributes
   | ^^^^^^^^^^^^^^^^^ help: remove this attribute
   |
note: attribute also specified here
  --> /checkout/tests/ui/attributes/optimize.rs:62:1
   |
LL | #[optimize(speed)]
   | ^^^^^^^^^^^^^^^^^^

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

@jhpratt jhpratt closed this Jun 4, 2026
@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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 4, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 4, 2026

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

This rollup was thus unapproved.

@jhpratt jhpratt deleted the rollup-tLZDZF7 branch June 4, 2026 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler 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.

6 participants