Skip to content

Rollup of 7 pull requests#152345

Closed
JonathanBrouwer wants to merge 23 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-sca1rG6
Closed

Rollup of 7 pull requests#152345
JonathanBrouwer wants to merge 23 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-sca1rG6

Conversation

@JonathanBrouwer
Copy link
Contributor

Successful merges:

r? @ghost

Create a similar rollup

eggyal and others added 23 commits January 21, 2026 18:40
This method was broken by 258ace6, which changed `self.normalized_pos`
to use relative offsets however this method continued to compare against
an absolute offset.

Also adds a regression test for the issue that this method was
originally introduced to fix.
Handle DefKind::TraitAlias in resolve_bound_vars so that associated
item constraints and return type notation work through trait aliases.
…llot

Fix `SourceFile::normalized_byte_pos`

This method was broken by 258ace6, which changed `self.normalized_pos` to use relative offsets however this method continued to compare against an absolute offset.

Also adds a regression test for the issue that this method was originally introduced to fix.

Closes rust-lang#149568
Fixes regression of rust-lang#110885

r? cjgillot (as author of the breaking commit)
…jdonszelmann

Remove support for slugs in diagnostic messages

This PR contains 5 commits, and is best reviewed commit-by-commit:
- rust-lang@ea87331 Removes support from slugs from `rustc_errors`
- rust-lang@62dd371 Removes support from slugs from `rustc_macros` (which declares `derive(Diagnostic)`)
- rust-lang@2289e6c Adjuist the `ui-fulldeps` testsuite to match the changes in `rustc_macros`
- rust-lang@0db0acd Removes support for the fallback bundle (which previously contained all messages, but is now empty) from `rustc_driver_impl` and `rustc_session`
- rust-lang@81d4214 Removes an integration test that tested the translation system using fluent
Replace some `feature(core_intrinsics)` with stable hints

I noticed that some compiler crates use `feature(core_intrinsics)` for optimization hints, when they could potentially be using stable `std::hint` functions instead.

This PR replaces the occurrences in `rustc_arena` and `rustc_data_structures`.
…zelmann,lqd

Fix a few diagnostics

When working on the inline diagnostics conversion (rust-lang#151366), I noticed that my script sometimes took the wrong message.
Because it didn't happen very often, I just fixed it manually when a uitest fails.

However I got paranoid that the script changed messages that were not covered by uitests, so I checked for all messages in the previous `messages.ftl` files, whether they occured at least once in the codebase. I found 3 messages that indeed were wrongly replaced by my script, fixed them, and added uitests to make sure this doesn't happen again :)

r? @jdonszelmann (Anyone else, also feel free to review, just assigning to Jana because she's been reviewing the other PRs)
…thercote

Cleanup offload datatransfer

There are 3 steps to run code on a GPU: Copy data from the host to the device, launch the kernel, and move it back.
At the moment, we have a single variable describing the memory handling to do in each step, but that makes it hard for LLVM's opt pass to understand what's going on. We therefore split it into three variables, each only including the bits relevant for the corresponding stage.

cc @jdoerfert @kevinsala

r? compiler
…ouwer

Port some attributes to the attr parser

Tracking issue: rust-lang#131229

r? @JonathanBrouwer
…alias, r=fmease

Fix bound var resolution for trait aliases

Fixes rust-lang#152158
Fixes rust-lang#152244
@rust-bors rust-bors bot added the rollup A PR which is a rollup label Feb 8, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-compiletest Area: The compiletest test runner A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic labels Feb 8, 2026
@rustbot rustbot added 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-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Feb 8, 2026
@JonathanBrouwer
Copy link
Contributor Author

@bors r+ rollup=never p=5

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 8, 2026

📌 Commit 0123808 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 Feb 8, 2026
@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Feb 8, 2026
…uwer

Rollup of 7 pull requests

Successful merges:

 - #151455 (Fix `SourceFile::normalized_byte_pos`)
 - #152250 (Remove support for slugs in diagnostic messages)
 - #152322 (Replace some `feature(core_intrinsics)` with stable hints)
 - #152328 (Fix a few diagnostics)
 - #151640 (Cleanup offload datatransfer)
 - #152212 (Port some attributes to the attr parser)
 - #152309 (Fix bound var resolution for trait aliases)
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
REPOSITORY                                   TAG       IMAGE ID       CREATED      SIZE
ghcr.io/dependabot/dependabot-updater-core   latest    b72a662c47e3   8 days ago   790MB
=> Removing docker images...
Deleted Images:
untagged: ghcr.io/dependabot/dependabot-updater-core:latest
untagged: ghcr.io/dependabot/dependabot-updater-core@sha256:57ef9cc45f72cc4258ee1baa8243bc3cd55c0a0e570b6768c37346247be35f0d
deleted: sha256:b72a662c47e31df2e7bf59368b2b83be239f02a1baa721393717711a1a719df9
deleted: sha256:3e13ccd80f19769f39008cfc6549938e1ea4905f47b028c1df2dd6085191386c
deleted: sha256:842807995a512b2c5a9b241a3aecdbe79af6b0642d96fa5460cfcf0c9d8be295
deleted: sha256:0f9074b9f46f4570eb7cb4b65fcb3c3d909f9b1d14ca66b30508117b6deda303
deleted: sha256:2ca99cb9251d19157c56b5d91c8961bb4b35196a5ca9b4ffdccbf24abbfe2a5f
---
test [ui] tests/ui/abi/anon-extern-mod.rs ... ok
test [ui] tests/ui/abi/arm-unadjusted-intrinsic.rs#aarch64 ... ok
test [ui] tests/ui/abi/arm-unadjusted-intrinsic.rs#arm ... ok
test [ui] tests/ui/abi/bad-custom.rs ... ignored, ignored on targets without inline assembly support
test [ui] tests/ui/abi/avr-sram.rs#disable_sram ... ok
test [ui] tests/ui/abi/avr-sram.rs#has_sram ... ok
test [ui] tests/ui/abi/avr-sram.rs#no_sram ... ok
test [ui] tests/ui/abi/c-zst.rs#aarch64-darwin ... ok
test [ui] tests/ui/abi/c-zst.rs#powerpc-linux ... ok
test [ui] tests/ui/abi/c-stack-as-value.rs ... ok
test [ui] tests/ui/abi/c-zst.rs#s390x-linux ... ok
test [ui] tests/ui/abi/c-zst.rs#sparc64-linux ... ok
---
test [ui] tests/ui/asm/aarch64/type-f16.rs ... ignored, ignored on targets without inline assembly support
test [ui] tests/ui/array-slice-vec/vector-no-ann-2.rs ... ok
test [ui] tests/ui/asm/aarch64/arm64ec-sve.rs ... ok
test [ui] tests/ui/array-slice-vec/vector-slice-matching-8498.rs ... ok
test [ui] tests/ui/asm/aarch64v8r.rs#hf ... ok
test [ui] tests/ui/asm/asm-with-nested-closure.rs ... ignored, ignored on targets without inline assembly support
test [ui] tests/ui/asm/aarch64v8r.rs#r82 ... ok
test [ui] tests/ui/asm/aarch64v8r.rs#sf ... ok
test [ui] tests/ui/asm/binary_asm_labels.rs ... ignored, only executed when the architecture is x86_64
test [ui] tests/ui/asm/binary_asm_labels_allowed.rs ... ignored, only executed when the architecture is aarch64
test [ui] tests/ui/asm/cfg-parse-error.rs ... ignored, ignored on targets without inline assembly support
test [ui] tests/ui/asm/cfg.rs#reva ... ignored, only executed when the architecture is x86_64
test [ui] tests/ui/asm/cfg.rs#revb ... ignored, only executed when the architecture is x86_64
---
test [ui] tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs#thin2 ... ignored, ignored on targets without threading support
test [ui] tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs#thin3 ... ignored, ignored on targets without threading support
test [ui] tests/ui/extern/issue-28324.rs ... ok
test [ui] tests/ui/extern/issue-36122-accessing-externed-dst.rs ... ok
test [ui] tests/ui/extern/lgamma-linkage.rs ... ignored, ignored when the architecture is wasm32 (wasi-libc does not have lgamma)
test [ui] tests/ui/extern/issue-95829.rs ... ok
test [ui] tests/ui/extern/issue-13655.rs ... ok
test [ui] tests/ui/extern/not-in-block.rs ... ok
test [ui] tests/ui/extern/unsized-extern-derefmove.rs ... ok
test [ui] tests/ui/feature-gates/allow-features-empty.rs ... ok
---
test [ui] tests/ui/imports/ambiguous-9.rs ... ok
test [ui] tests/ui/imports/ambiguous-glob-vs-expanded-extern.rs ... ok
test [ui] tests/ui/imports/ambiguous-import-visibility-module.rs ... ok
test [ui] tests/ui/imports/ambiguous-8.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-glob-vs-multiouter.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-globvsglob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-no-implicit-prelude.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-non-prelude-core-glob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-non-prelude-std-glob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-pick-core.rs ... ok
test [ui] tests/ui/imports/ambiguous-import-visibility-macro.rs ... ok
---

- error: call to deprecated safe function `std::os::unix::process::CommandExt::before_exec` is unsafe and requires unsafe block
-   --> $DIR/unsafe-before_exec-suggestion.rs:12:5
3    |
4 LL |     cmd.before_exec(|| Ok(()));
-    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
6    |
-    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2024!
-    = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/newly-unsafe-functions.html>
- note: the lint level is defined here
-   --> $DIR/unsafe-before_exec-suggestion.rs:4:9
11    |
- LL | #![deny(deprecated_safe_2024)]
-    |         ^^^^^^^^^^^^^^^^^^^^
- help: you can wrap the call in an `unsafe` block if you can guarantee that the closure is async-signal-safe
15    |
- LL +     // TODO: Audit that the closure is async-signal-safe.
- LL ~     unsafe { cmd.before_exec(|| Ok(())) };
18    |
19 
- error: aborting due to 1 previous error
21 


The actual stderr differed from the expected stderr
Saved the actual fixed to `/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rust-2024/unsafe-before_exec-suggestion/unsafe-before_exec-suggestion.fixed`
diff of fixed:

9 #[allow(deprecated)]
10 fn main() {
11     let mut cmd = Command::new("sleep");
-     // TODO: Audit that the closure is async-signal-safe.
-     unsafe { cmd.before_exec(|| Ok(())) };
14     //~^ ERROR call to deprecated safe function
15     //~| WARN this is accepted in the current edition
16     drop(cmd);


The actual fixed differed from the expected fixed
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args rust-2024/unsafe-before_exec-suggestion.rs`

error: 2 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/rust-2024/unsafe-before_exec-suggestion.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=wasm32-wasip1" "--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/x86_64-unknown-linux-gnu/test/ui/rust-2024/unsafe-before_exec-suggestion" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/wasm32-wasip1/native/rust-test-helpers" "--edition=2015"
stdout: none
--- stderr -------------------------------
error[E0433]: failed to resolve: could not find `unix` in `os`
##[error]  --> /checkout/tests/ui/rust-2024/unsafe-before_exec-suggestion.rs:7:14
   |
---

error[E0599]: no method named `before_exec` found for struct `Command` in the current scope
##[error]  --> /checkout/tests/ui/rust-2024/unsafe-before_exec-suggestion.rs:12:9
   |
LL |     cmd.before_exec(|| Ok(()));
   |         ^^^^^^^^^^^ method not found in `Command`

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0433, E0599.

@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 Feb 8, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 8, 2026

💔 Test for ae91a2d failed: CI. Failed job:

@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 Feb 8, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 8, 2026

PR #152328, which is a member of this rollup, was unapproved.
This rollup was thus also 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 Feb 8, 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-compiletest Area: The compiletest test runner A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic rollup A PR which is a rollup 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-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.

8 participants