Skip to content

Shrink ast::Expr64#158720

Open
nnethercote wants to merge 1 commit into
rust-lang:mainfrom
nnethercote:Expr64
Open

Shrink ast::Expr64#158720
nnethercote wants to merge 1 commit into
rust-lang:mainfrom
nnethercote:Expr64

Conversation

@nnethercote

@nnethercote nnethercote commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

View all comments

From 72 bytes to 64 bytes, by boxing ForLoop, which is the biggest
variant.

There are now 11 ExprKind variants that are 31 bytes, so future
improvements here will be very difficult.

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. labels Jul 3, 2026
@nnethercote

Copy link
Copy Markdown
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 3, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 3, 2026
@rust-log-analyzer

This comment has been minimized.

@nnethercote

Copy link
Copy Markdown
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 3, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-bors

rust-bors Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 05fc14a (05fc14a7ef6f521e0ff88a111b396eb0d1729253)
Base parent: c397dae (c397dae808f70caebab1fc4e11b3edf7e59f58c7)

@rust-timer

This comment has been minimized.

@rust-timer

This comment was marked as outdated.

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Jul 3, 2026
@rust-bors

This comment has been minimized.

@nnethercote

Copy link
Copy Markdown
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 11, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 11, 2026
@rust-log-analyzer

This comment has been minimized.

@nnethercote

Copy link
Copy Markdown
Contributor Author

The oli review assignment was indeed a race condition. Sorry for the confusion.

@bors r=folkertdev

@rust-bors

rust-bors Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 36487c7 has been approved by folkertdev

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 13, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Contributor

@bors p=6
Scheduling

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 13, 2026
Shrink `ast::Expr64`



From 72 bytes to 64 bytes, by boxing `ForLoop`, which is the biggest
variant.

There are now 11 `ExprKind` variants that are 31 bytes, so future
improvements here will be very difficult.
@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 13, 2026
@rust-bors

rust-bors Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 0c4d418 failed: CI. Failed job:

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
[1446/3892] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/WinEHPrepare.cpp.o
[1447/3892] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/LiveDebugValues/LiveDebugValues.cpp.o
[1448/3892] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/XRayInstrumentation.cpp.o
[1449/3892] Linking CXX static library lib/libLLVMFrontendAtomic.a
FAILED: [code=1] lib/libLLVMFrontendAtomic.a 
: && "/Applications/Xcode_26.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool" -static -no_warning_for_no_symbols -o lib/libLLVMFrontendAtomic.a  lib/Frontend/Atomic/CMakeFiles/LLVMFrontendAtomic.dir/Atomic.cpp.o && cd /Users/runner/work/rust/rust/build/aarch64-apple-darwin/llvm/build/lib/Frontend/Atomic && touch /Users/runner/work/rust/rust/build/aarch64-apple-darwin/llvm/build/./lib/libLLVMFrontendAtomic.a
fatal error: /Applications/Xcode_26.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't write to output file (Input/output error)
[1450/3892] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/LiveDebugValues/VarLocBasedImpl.cpp.o
[1451/3892] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/LiveDebugValues/InstrRefBasedImpl.cpp.o
ninja: build stopped: subcommand failed.

thread 'main' (30877) panicked at /Users/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cmake-0.1.54/src/lib.rs:1119:5:
---
   0: __rustc::rust_begin_unwind
             at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/panicking.rs:689:5
   1: core::panicking::panic_fmt
             at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/core/src/panicking.rs:80:14
   2: cmake::fail
   3: cmake::run
   4: <cmake::Config>::build
   5: <bootstrap::core::build_steps::llvm::Llvm as bootstrap::core::builder::Step>::run
             at ./src/bootstrap/src/core/build_steps/llvm.rs:555:13
   6: <bootstrap::core::builder::Builder>::ensure::<bootstrap::core::build_steps::llvm::Llvm>
             at ./src/bootstrap/src/core/builder/mod.rs:1650:36
   7: <bootstrap::core::build_steps::compile::Assemble as bootstrap::core::builder::Step>::run
             at ./src/bootstrap/src/core/build_steps/compile.rs:2142:69
   8: <bootstrap::core::builder::Builder>::ensure::<bootstrap::core::build_steps::compile::Assemble>
             at ./src/bootstrap/src/core/builder/mod.rs:1650:36
   9: <bootstrap::core::builder::Builder>::compiler
             at ./src/bootstrap/src/core/builder/mod.rs:1205:14
  10: <bootstrap::core::build_steps::test::Ui as bootstrap::core::builder::Step>::make_run
             at ./src/bootstrap/src/core/build_steps/test.rs:1820:49
  11: <bootstrap::core::builder::StepDescription>::maybe_run
             at ./src/bootstrap/src/core/builder/mod.rs:480:13
  12: bootstrap::core::builder::cli_paths::match_paths_to_steps_and_run
             at ./src/bootstrap/src/core/builder/cli_paths.rs:142:22
  13: <bootstrap::core::builder::Builder>::run_step_descriptions
             at ./src/bootstrap/src/core/builder/mod.rs:1177:9
  14: <bootstrap::core::builder::Builder>::execute_cli
             at ./src/bootstrap/src/core/builder/mod.rs:1156:14
  15: <bootstrap::Build>::build
             at ./src/bootstrap/src/lib.rs:802:25
  16: bootstrap::main
             at ./src/bootstrap/src/bin/main.rs:149:11
  17: <fn() as core::ops::function::FnOnce<()>>::call_once
             at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Important

For more information how to resolve CI failures of this job, visit this link.

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

@bors try jobs=aarch64-apple-macos-26

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 13, 2026
Shrink `ast::Expr64`


try-job: aarch64-apple-macos-26
@rust-bors

rust-bors Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: e3b12c2 (e3b12c247ed7892aa5b0e0f217ab91c8647c0a74)
Base parent: 225e91c (225e91c03da22cd4b9792b83c1cfc97967101614)

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

@bors retry
@bors p=0

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

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 14, 2026
Shrink `ast::Expr64`



From 72 bytes to 64 bytes, by boxing `ForLoop`, which is the biggest
variant.

There are now 11 `ExprKind` variants that are 31 bytes, so future
improvements here will be very difficult.
@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 5.96s

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:33:25
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:3765:5
Executed at: src/bootstrap/src/core/build_steps/test.rs:3771: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:3771:10
   5: <bootstrap::core::build_steps::test::Distcheck as bootstrap::core::builder::Step>::run
             at /checkout/src/bootstrap/src/core/build_steps/test.rs:3734:9
   6: <bootstrap::core::builder::Builder>::ensure::<bootstrap::core::build_steps::test::Distcheck>
             at /checkout/src/bootstrap/src/core/builder/mod.rs:1650: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:3717: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:233:18
  10: <bootstrap::core::builder::Builder>::run_step_descriptions
             at /checkout/src/bootstrap/src/core/builder/mod.rs:1177:9
  11: <bootstrap::core::builder::Builder>::execute_cli
             at /checkout/src/bootstrap/src/core/builder/mod.rs:1156: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/08d5b675a9b2abdca5e2fe4eabe0e07bbda15d49/library/core/src/ops/function.rs:250:5
  15: std::sys::backtrace::__rust_begin_short_backtrace::<fn(), ()>
             at /rustc/08d5b675a9b2abdca5e2fe4eabe0e07bbda15d49/library/std/src/sys/backtrace.rs:166:18
  16: std::rt::lang_start::<()>::{closure#0}
             at /rustc/08d5b675a9b2abdca5e2fe4eabe0e07bbda15d49/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/08d5b675a9b2abdca5e2fe4eabe0e07bbda15d49/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/08d5b675a9b2abdca5e2fe4eabe0e07bbda15d49/library/std/src/panicking.rs:576:43
  19: std::panicking::catch_unwind::<i32, &dyn core::ops::function::Fn<(), Output = i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe>
             at /rustc/08d5b675a9b2abdca5e2fe4eabe0e07bbda15d49/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/08d5b675a9b2abdca5e2fe4eabe0e07bbda15d49/library/std/src/panic.rs:359:14
  21: std::rt::lang_start_internal::{closure#0}
             at /rustc/08d5b675a9b2abdca5e2fe4eabe0e07bbda15d49/library/std/src/rt.rs:175:24
  22: std::panicking::catch_unwind::do_call::<std::rt::lang_start_internal::{closure#0}, isize>
             at /rustc/08d5b675a9b2abdca5e2fe4eabe0e07bbda15d49/library/std/src/panicking.rs:576:43
---
  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:3717
Build completed unsuccessfully in 0:39:05
  local time: Tue Jul 14 11:10:00 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 14, 2026
@rust-bors

rust-bors Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 586eb5f failed: CI. Failed job:

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

@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 14, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Contributor

@bors p=6
Scheduling

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

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustfmt Relevant to the rustfmt 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