Skip to content

Stop using prefix_tys#156650

Open
dingxiangfei2009 wants to merge 1 commit into
rust-lang:mainfrom
dingxiangfei2009:coro-no-prefix-tys
Open

Stop using prefix_tys#156650
dingxiangfei2009 wants to merge 1 commit into
rust-lang:mainfrom
dingxiangfei2009:coro-no-prefix-tys

Conversation

@dingxiangfei2009

@dingxiangfei2009 dingxiangfei2009 commented May 16, 2026

Copy link
Copy Markdown
Contributor

This is a member of a patch series to replace #135527.

This function hints at an early commitment to coroutine memory layout. We should not give promises on how upvars are allocated.

@rustbot

rustbot commented May 16, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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. labels May 16, 2026
@rustbot

rustbot commented May 16, 2026

Copy link
Copy Markdown
Collaborator

r? @tiif

rustbot has assigned @tiif.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler, debuginfo
  • compiler, debuginfo expanded to 73 candidates
  • Random selection from 15 candidates

@cjgillot cjgillot assigned cjgillot and tiif and unassigned tiif May 18, 2026
@cjgillot

Copy link
Copy Markdown
Contributor

Do you mind rebasing and running x.py fmt to remove formatting changes? That will make review much easier.

@rustbot

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@cjgillot cjgillot 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 May 22, 2026
@rust-bors

This comment has been minimized.

This function hints at an early commitment to coroutine memory layout.
We should not give promises on how upvars are allocated.

Signed-off-by: Xiangfei Ding <dingxiangfei2009@protonmail.ch>
@rustbot

rustbot commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@dingxiangfei2009

Copy link
Copy Markdown
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 5, 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)

---- [debuginfo-gdb] tests/debuginfo/coroutine-objects.rs stdout ----
NOTE: compiletest thinks it is using GDB version 16003000

error: check directive(s) from `/checkout/tests/debuginfo/coroutine-objects.rs` not found in debugger output. errors:
    (coroutine-objects.rs:16) `$1 = coroutine_objects::main::{coroutine_env#0}::Unresumed{_ref__a: 0x[...]}`
    (coroutine-objects.rs:19) `$2 = coroutine_objects::main::{coroutine_env#0}::Suspend0{c: 6, d: 7, _ref__a: 0x[...]}`
    (coroutine-objects.rs:22) `$3 = coroutine_objects::main::{coroutine_env#0}::Suspend1{c: 7, d: 8, _ref__a: 0x[...]}`
    (coroutine-objects.rs:25) `$4 = coroutine_objects::main::{coroutine_env#0}::Returned{_ref__a: 0x[...]}`
status: exit status: 0
command: PYTHONPATH="/checkout/src/etc" "/usr/bin/gdb" "-quiet" "-batch" "-nx" "-command=/checkout/obj/build/aarch64-unknown-linux-gnu/test/debuginfo/coroutine-objects.gdb/coroutine-objects.debugger.script"
--- stdout -------------------------------
GNU gdb (Ubuntu 16.3-1ubuntu2) 16.3
Copyright (C) 2024 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 "aarch64-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".
To enable execution of this file add
 add-auto-load-safe-path /checkout/src/etc/gdb_load_rust_pretty_printers.py
line to your configuration file "/home/user/.config/gdb/gdbinit".
To completely disable this security protection add
 set auto-load safe-path /
line to your configuration file "/home/user/.config/gdb/gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
 info "(gdb)Auto-loading safe path"
Breakpoint 1 at 0x1114: file /checkout/tests/debuginfo/coroutine-objects.rs, line 79.
Breakpoint 2 at 0x1150: file /checkout/tests/debuginfo/coroutine-objects.rs, line 81.
Breakpoint 3 at 0x1170: file /checkout/tests/debuginfo/coroutine-objects.rs, line 83.
Breakpoint 4 at 0x1190: file /checkout/tests/debuginfo/coroutine-objects.rs, line 85.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".

Breakpoint 1, coroutine_objects::main () at /checkout/tests/debuginfo/coroutine-objects.rs:79
79     _zzz(); // #break
$1 = coroutine_objects::main::{coroutine_env#0}::Unresumed

Breakpoint 2, coroutine_objects::main () at /checkout/tests/debuginfo/coroutine-objects.rs:81
81     _zzz(); // #break
$2 = coroutine_objects::main::{coroutine_env#0}::Suspend0{c: 6, d: 7}

Breakpoint 3, coroutine_objects::main () at /checkout/tests/debuginfo/coroutine-objects.rs:83
83     _zzz(); // #break
$3 = coroutine_objects::main::{coroutine_env#0}::Suspend1{c: 7, d: 8}
6 7 8

Breakpoint 4, coroutine_objects::main () at /checkout/tests/debuginfo/coroutine-objects.rs:85
85     _zzz(); // #break
$4 = coroutine_objects::main::{coroutine_env#0}::Returned
A debugging session is active.

 Inferior 1 [process 244469] will be killed.

Quit anyway? (y or n) [answered Y; input not from terminal]
------------------------------------------
--- stderr -------------------------------
warning: File "/checkout/src/etc/gdb_load_rust_pretty_printers.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
------------------------------------------

---- [debuginfo-gdb] tests/debuginfo/coroutine-objects.rs stdout end ----
---- [debuginfo-gdb] tests/debuginfo/issue-57822.rs stdout ----
NOTE: compiletest thinks it is using GDB version 16003000

error: check directive(s) from `/checkout/tests/debuginfo/issue-57822.rs` not found in debugger output. errors:
    (issue-57822.rs:18) `$2 = issue_57822::main::{coroutine_env#3}::Unresumed{a: issue_57822::main::{coroutine_env#2}::Unresumed{y: 2}}`
the following subset of check directive(s) was found successfully:
    (issue-57822.rs:15) `$1 = issue_57822::main::{closure_env#1} {f: issue_57822::main::{closure_env#0} {x: 1}}`
status: exit status: 0
command: PYTHONPATH="/checkout/src/etc" "/usr/bin/gdb" "-quiet" "-batch" "-nx" "-command=/checkout/obj/build/aarch64-unknown-linux-gnu/test/debuginfo/issue-57822.gdb/issue-57822.debugger.script"
--- stdout -------------------------------
GNU gdb (Ubuntu 16.3-1ubuntu2) 16.3
Copyright (C) 2024 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 "aarch64-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".
To enable execution of this file add
 add-auto-load-safe-path /checkout/src/etc/gdb_load_rust_pretty_printers.py
line to your configuration file "/home/user/.config/gdb/gdbinit".
To completely disable this security protection add
 set auto-load safe-path /
line to your configuration file "/home/user/.config/gdb/gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
 info "(gdb)Auto-loading safe path"
Breakpoint 1 at 0xbd4: file /checkout/tests/debuginfo/issue-57822.rs, line 52.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".

Breakpoint 1, issue_57822::main () at /checkout/tests/debuginfo/issue-57822.rs:52
52     zzz(); // #break
$1 = issue_57822::main::{closure_env#1} {f: issue_57822::main::{closure_env#0} {x: 1}}
$2 = issue_57822::main::{coroutine_env#3}::Unresumed
A debugging session is active.

 Inferior 1 [process 245016] will be killed.

Quit anyway? (y or n) [answered Y; input not from terminal]
------------------------------------------
--- stderr -------------------------------
warning: File "/checkout/src/etc/gdb_load_rust_pretty_printers.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
------------------------------------------

---- [debuginfo-gdb] tests/debuginfo/issue-57822.rs stdout end ----

failures:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants