Skip to content

Rollup of 8 pull requests#159132

Closed
JonathanBrouwer wants to merge 17 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-rAu3KCO
Closed

Rollup of 8 pull requests#159132
JonathanBrouwer wants to merge 17 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-rAu3KCO

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

joboet and others added 17 commits June 28, 2026 23:11
instead of the build triple

Debugging other architectures with the build target CDB is neither a common
nor a good user experience - for example, when targeting i686 from a x86_64
build target, you get all the internal WOW64 events, which also break
debuginfo tests.

Use the cdb.exe that corresponds to the target's architecture instead.
LLVM 23 is now handling register allocation slightly differently and
only uses CostPerUse=1 in -O{s,z} instead of unconditionally. This
causes the -O3 behavior in this test to be a little smarter and skip
some moves.

I have attempted to make the test pass on both LLVM 22 and 23 without
overly weakening it. Hopefully this is good enough!
`ExprKind::InlineAsm` was always printed as `asm!`, so `naked_asm!` was
printed as `asm!` too. Use `asm_macro.macro_name()` in the AST and HIR
pretty-printers to print the correct name.
…stics

Point users at `#![feature(generic_const_args)]` and `type const` items
when they hit the "generic parameters may not be used in const operations"
error, not just `generic_const_exprs`.
We do this by using old-style ThinVec for storing debuginfos collection, which is almost always empty.
…Mark-Simulacrum

Fix PR number in bootstrap's change tracker

Missed this in rust-lang#158912 🤦
…gnostic-156729, r=petrochenkov

diagnostics: suggest generic_const_args for const ops

fixes rust-lang#156729

when const ops hit generic params, like `[u8; size_of::<self>()]`, the diagnostic only points at `generic_const_exprs`. imo that's a stale nudge now that `generic_const_args` and `type const` items are the path we want people trying.

add help for `generic_const_args` and `type const` items in the resolve and hir_ty_lowering paths. also skip the old gce suggestion once `min_generic_const_args` is enabled, and emit both suggestions for the `self` alias path so the "alternatively" wording doesn't hang there by itself. includes the regression test from the issue. lgtm.
…ller, r=JohnTitor

Shrink mir::Statement to 40 bytes

We do this by using (old-style) ThinVec for storing debuginfo.

This collection is almost always empty, so we can optimize for that case. I think we could do better by storing the debuginfo elsewhere, but this is the least invasive change for now.
…nthey

std: use `OnceLock` for SGX argument storage

Just like rust-lang#158180, using a `OnceLock` is much better. Though I guess that in this case a `static mut` would be fine as well...

CC @jethrogb @raoulstrackx @aditijannu
… r=chenyukang

Add regression test for $-prefixed fragment specifier in repetition

Fixes rust-lang#157157.

The diagnostic was fixed in rust-lang#155643, but the existing test only covers an accidental `$` before a fragment specifier at the top level of a matcher.
This adds the equivalent case inside a repetition.

The new case reuses `$test:$tt` from the adjacent test so that repetition nesting is the only difference between the two cases.

Tested with:
- `./x test tests/ui/macros/macro-missing-fragment.rs`

This is my first contribution to this repository, so please let me know if I have missed any conventions or required steps or should make any additional changes.
…target, r=jieyouxu

Look for the cdb architecture that corresponds to the target triple

instead of the build triple

Debugging other architectures with the build target CDB is neither a common nor a good user experience - for example, when targeting i686 from a x86_64 build target, you get all the internal WOW64 events, which also break debuginfo tests. (See rust-lang#159032)

Use the cdb.exe that corresponds to the target's architecture instead.
…rtdev

riscv: update c-variadic test for LLVM changes

LLVM 23 is now handling register allocation slightly differently and only uses CostPerUse=1 in -O{s,z} instead of unconditionally. This causes the -O3 behavior in this test to be a little smarter and skip some moves.

I have attempted to make the test pass on both LLVM 22 and 23 without overly weakening it. Hopefully this is good enough!

llvm/llvm-project@046bd54 is the matching LLVM change.

@rustbot label: +llvm-main
…-name, r=folkertdev

pretty-print: use inline asm's actual macro name

`ExprKind::InlineAsm` was always printed as `asm!`, so `naked_asm!` was printed as `asm!` too. Use `asm_macro.macro_name()` in the AST and HIR pretty-printers to print the correct name.
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jul 11, 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-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jul 11, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Contributor Author

@bors r+ rollup=never p=5

Trying commonly failed jobs
@bors try jobs=dist-various-1,test-various,x86_64-gnu-aux,x86_64-gnu-llvm-21-3,x86_64-msvc-1,aarch64-apple,x86_64-mingw-1,i686-msvc-*

@rust-bors

rust-bors Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 85f0f56 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 11, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 11, 2026
Rollup of 8 pull requests


try-job: dist-various-1
try-job: test-various
try-job: x86_64-gnu-aux
try-job: x86_64-gnu-llvm-21-3
try-job: x86_64-msvc-1
try-job: aarch64-apple
try-job: x86_64-mingw-1
try-job: i686-msvc-*
@rust-bors

This comment has been minimized.

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

Rollup of 8 pull requests

Successful merges:

 - #159126 (Fix PR number in bootstrap's change tracker)
 - #156968 (diagnostics: suggest generic_const_args for const ops)
 - #159012 (Shrink mir::Statement to 40 bytes)
 - #158182 (std: use `OnceLock` for SGX argument storage)
 - #159114 (Add regression test for $-prefixed fragment specifier in repetition)
 - #159060 (Look for the cdb architecture that corresponds to the target triple)
 - #159089 (riscv: update c-variadic test for LLVM changes)
 - #159093 (pretty-print: use inline asm's actual macro name)
@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 11, 2026
@rust-bors

rust-bors Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 71c4730 failed: CI. Failed job:

@rust-log-analyzer

Copy link
Copy Markdown
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)
test [debuginfo-gdb] tests/debuginfo/zst-interferes-with-prologue.rs ... ok

failures:

---- [debuginfo-gdb] tests/debuginfo/function-call.rs stdout ----
NOTE: compiletest thinks it is using GDB version 12001000
------gdb stdout------------------------------
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04.2) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
Breakpoint 1 at 0x9552: file /checkout/tests/debuginfo/function-call.rs, line 36.

Breakpoint 1, function_call::main () at /checkout/tests/debuginfo/function-call.rs:36
36     zzz(); // #break

------gdb stderr------------------------------
/checkout/obj/build/x86_64-unknown-linux-gnu/test/debuginfo/function-call.gdb/function-call.debugger.script:11: Error in sourced command file:
Couldn't write extended state status: Bad address.

------------------------------------------

error: gdb failed to execute
status: exit status: 1
command: PYTHONPATH="/checkout/src/etc" "/usr/bin/gdb" "-quiet" "-batch" "-nx" "-command=/checkout/obj/build/x86_64-unknown-linux-gnu/test/debuginfo/function-call.gdb/function-call.debugger.script"
--- stdout -------------------------------
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04.2) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
Breakpoint 1 at 0x9552: file /checkout/tests/debuginfo/function-call.rs, line 36.

Breakpoint 1, function_call::main () at /checkout/tests/debuginfo/function-call.rs:36
36     zzz(); // #break
------------------------------------------
--- stderr -------------------------------
/checkout/obj/build/x86_64-unknown-linux-gnu/test/debuginfo/function-call.gdb/function-call.debugger.script:11: Error in sourced command file:
Couldn't write extended state status: Bad address.
------------------------------------------

@JonathanBrouwer

Copy link
Copy Markdown
Contributor Author

@bors retry

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

This comment has been minimized.

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

Rollup of 8 pull requests

Successful merges:

 - #159126 (Fix PR number in bootstrap's change tracker)
 - #156968 (diagnostics: suggest generic_const_args for const ops)
 - #159012 (Shrink mir::Statement to 40 bytes)
 - #158182 (std: use `OnceLock` for SGX argument storage)
 - #159114 (Add regression test for $-prefixed fragment specifier in repetition)
 - #159060 (Look for the cdb architecture that corresponds to the target triple)
 - #159089 (riscv: update c-variadic test for LLVM changes)
 - #159093 (pretty-print: use inline asm's actual macro name)
@rust-bors

rust-bors Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 9035374 (90353744ccc848cb001023d1afcdffb0faf3157b)
Base parent: 3b58636 (3b58636b30eb364ac72aeaf03d46347084ed87d1)

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
.iiii....ii..i.......ii..i......i......................i..i..ii......................

failures:

---- [debuginfo-gdb] tests/debuginfo/function-call.rs stdout ----
NOTE: compiletest thinks it is using GDB version 12001000
------gdb stdout------------------------------
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04.2) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
Breakpoint 1 at 0x1b42: file tests/debuginfo/function-call.rs, line 36.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Breakpoint 1, function_call::main () at tests/debuginfo/function-call.rs:36
36     zzz(); // #break

------gdb stderr------------------------------
/tmp/distcheck/distcheck-rustc-src/build/x86_64-unknown-linux-gnu/test/debuginfo/function-call.gdb/function-call.debugger.script:11: Error in sourced command file:
Couldn't write extended state status: Bad address.

------------------------------------------

error: gdb failed to execute
status: exit status: 1
command: PYTHONPATH="/tmp/distcheck/distcheck-rustc-src/src/etc" "/usr/bin/gdb" "-quiet" "-batch" "-nx" "-command=/tmp/distcheck/distcheck-rustc-src/build/x86_64-unknown-linux-gnu/test/debuginfo/function-call.gdb/function-call.debugger.script"
--- stdout -------------------------------
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04.2) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
Breakpoint 1 at 0x1b42: file tests/debuginfo/function-call.rs, line 36.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Breakpoint 1, function_call::main () at tests/debuginfo/function-call.rs:36
36     zzz(); // #break
------------------------------------------
--- stderr -------------------------------
/tmp/distcheck/distcheck-rustc-src/build/x86_64-unknown-linux-gnu/test/debuginfo/function-call.gdb/function-call.debugger.script:11: Error in sourced command file:
Couldn't write extended state status: Bad address.
------------------------------------------
---
test result: FAILED. 148 passed; 1 failed; 24 ignored; 0 measured; 0 filtered out; finished in 7.77s

Some tests failed in compiletest suite=debuginfo mode=debuginfo host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu
Build completed unsuccessfully in 0:35:12
make: *** [Makefile:49: check] Error 1
Command `make check [workdir=/tmp/distcheck/distcheck-rustc-src]` failed with exit code 2
Created at: src/bootstrap/src/core/build_steps/test.rs:3766:5
Executed at: src/bootstrap/src/core/build_steps/test.rs:3772:10

--- BACKTRACE vvv
   0: <bootstrap::utils::exec::DeferredCommand>::finish_process
             at /checkout/src/bootstrap/src/utils/exec.rs:938:17
   1: <bootstrap::utils::exec::DeferredCommand>::wait_for_output::<&bootstrap::utils::exec::ExecutionContext>
             at /checkout/src/bootstrap/src/utils/exec.rs:830:21
   2: <bootstrap::utils::exec::ExecutionContext>::run
             at /checkout/src/bootstrap/src/utils/exec.rs:740:45
   3: <bootstrap::utils::exec::BootstrapCommand>::run::<&bootstrap::core::builder::Builder>
             at /checkout/src/bootstrap/src/utils/exec.rs:338:27
   4: bootstrap::core::build_steps::test::distcheck_plain_source_tarball
             at /checkout/src/bootstrap/src/core/build_steps/test.rs:3772:10
   5: <bootstrap::core::build_steps::test::Distcheck as bootstrap::core::builder::Step>::run
             at /checkout/src/bootstrap/src/core/build_steps/test.rs:3735:9
   6: <bootstrap::core::builder::Builder>::ensure::<bootstrap::core::build_steps::test::Distcheck>
             at /checkout/src/bootstrap/src/core/builder/mod.rs:1618:36
   7: <bootstrap::core::build_steps::test::Distcheck as bootstrap::core::builder::Step>::make_run
             at /checkout/src/bootstrap/src/core/build_steps/test.rs:3718:21
   8: <bootstrap::core::builder::StepDescription>::maybe_run
             at /checkout/src/bootstrap/src/core/builder/mod.rs:480:13
   9: bootstrap::core::builder::cli_paths::match_paths_to_steps_and_run
             at /checkout/src/bootstrap/src/core/builder/cli_paths.rs:232:18
  10: <bootstrap::core::builder::Builder>::run_step_descriptions
             at /checkout/src/bootstrap/src/core/builder/mod.rs:1145:9
  11: <bootstrap::core::builder::Builder>::execute_cli
             at /checkout/src/bootstrap/src/core/builder/mod.rs:1124:14
  12: <bootstrap::Build>::build
             at /checkout/src/bootstrap/src/lib.rs:802:25
  13: bootstrap::main
             at /checkout/src/bootstrap/src/bin/main.rs:149:11
  14: <fn() as core::ops::function::FnOnce<()>>::call_once
             at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/core/src/ops/function.rs:250:5
  15: std::sys::backtrace::__rust_begin_short_backtrace::<fn(), ()>
             at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/sys/backtrace.rs:166:18
  16: std::rt::lang_start::<()>::{closure#0}
             at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/rt.rs:206:18
  17: <&dyn core::ops::function::Fn<(), Output = i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe as core::ops::function::FnOnce<()>>::call_once
             at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/core/src/ops/function.rs:287:21
  18: std::panicking::catch_unwind::do_call::<&dyn core::ops::function::Fn<(), Output = i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe, i32>
             at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/panicking.rs:581:40
  19: std::panicking::catch_unwind::<i32, &dyn core::ops::function::Fn<(), Output = i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe>
             at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/panicking.rs:544:19
  20: std::panic::catch_unwind::<&dyn core::ops::function::Fn<(), Output = i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe, i32>
             at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/panic.rs:359:14
  21: std::rt::lang_start_internal::{closure#0}
             at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/rt.rs:175:24
  22: std::panicking::catch_unwind::do_call::<std::rt::lang_start_internal::{closure#0}, isize>
             at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/panicking.rs:581:40
---
  29: __libc_start_main
  30: _start


Command has failed. Rerun with -v to see more details.
Bootstrap failed while executing `test distcheck`
Currently active steps:
test::Distcheck {  } at src/bootstrap/src/core/build_steps/test.rs:3718
Build completed unsuccessfully in 0:42:13
  local time: Sat Jul 11 16:59:20 UTC 2026

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

rust-bors Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 511cb4c failed: CI. Failed job:

@JonathanBrouwer

Copy link
Copy Markdown
Contributor Author

Spurious again, making a bigger rollup

@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 Jul 11, 2026
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 11, 2026
@rust-bors

rust-bors Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved due to being closed.

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-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-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.