Skip to content

Remove const_struct from rustc_codegen_ssa - #165927

Open
beetrees wants to merge 1 commit into
rust-lang:mainfrom
beetrees:no-ssa-const-struct
Open

beetrees wants to merge 1 commit into
rust-lang:mainfrom
beetrees:no-ssa-const-struct

Conversation

@beetrees

Copy link
Copy Markdown
Contributor

It's unused outside of rustc_codegen_llvm/rustc_codegen_gcc, and shouldn't be used in future in rustc_codegen_ssa to help allow backends that don't support immediate aggregate types to use rustc_codegen_ssa in the future.

r? @bjorn3

@rustbot

rustbot commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

rustc_codegen_gcc is developed in its own repository. If possible, consider making this change to rust-lang/rustc_codegen_gcc instead.

cc @antoyo, @GuillaumeGomez

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

bjorn3 commented Nov 13, 2026

Copy link
Copy Markdown
Member

@bors r+

@rust-bors

rust-bors Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 24068cd has been tentatively approved by bjorn3

It will be put into the queue for this repository once PR CI succeeds.

@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 Nov 13, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 13, 2026
…orn3

Remove `const_struct` from `rustc_codegen_ssa`

It's unused outside of `rustc_codegen_llvm`/`rustc_codegen_gcc`, and shouldn't be used in future in `rustc_codegen_ssa` to help allow backends that don't support immediate aggregate types to use `rustc_codegen_ssa` in the future.

r? @bjorn3
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 13, 2026
…orn3

Remove `const_struct` from `rustc_codegen_ssa`

It's unused outside of `rustc_codegen_llvm`/`rustc_codegen_gcc`, and shouldn't be used in future in `rustc_codegen_ssa` to help allow backends that don't support immediate aggregate types to use `rustc_codegen_ssa` in the future.

r? @bjorn3
rust-bors Bot pushed a commit that referenced this pull request Nov 13, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - #160618 (require a consistent codegen backend when -Zllvm-target-feature is present)
 - #164043 (alloc: Unstably add `Vec::repeat` and `Vec::repeat_in`)
 - #164823 (Use `DerefMut` and `IndexMut` before `&raw mut` autoborrow)
 - #165568 (rustdoc: Suggest corrections for reference label typos)
 - #165924 (rustc_codegen_gcc subtree update 2026-11-13)
 - #165927 (Remove `const_struct` from `rustc_codegen_ssa`)
 - #165928 (Replace most uses of `type_array` with `type_byte_array` in `rustc_codegen_llvm`)
 - #164362 (Emit note for `non_exhaustive` within defining crate for `unreachable_patterns`)
 - #164997 (Fix as str suggestion in subpattern)
 - #165868 (Small changes to dyn compatibility)
 - #165879 (Add `#[rustc_test_entrypoint_marker]` back !)
 - #165903 (Fix borrowck ICE when a borrow outlives a local in a const block)
 - #165914 (Use `trim_prefix` in bootstrap)
 - #165919 (tests: accept better behavior on underaligned accesses)
Zalathar added a commit to Zalathar/rust that referenced this pull request Nov 13, 2026
…orn3

Remove `const_struct` from `rustc_codegen_ssa`

It's unused outside of `rustc_codegen_llvm`/`rustc_codegen_gcc`, and shouldn't be used in future in `rustc_codegen_ssa` to help allow backends that don't support immediate aggregate types to use `rustc_codegen_ssa` in the future.

r? @bjorn3
rust-bors Bot pushed a commit that referenced this pull request Nov 13, 2026
Rollup of 17 pull requests

Successful merges:

 - #160618 (require a consistent codegen backend when -Zllvm-target-feature is present)
 - #164043 (alloc: Unstably add `Vec::repeat` and `Vec::repeat_in`)
 - #164808 (asm const ptr: move name generation to asm-specific logic)
 - #164823 (Use `DerefMut` and `IndexMut` before `&raw mut` autoborrow)
 - #165475 (Add a `!type` annotation to a vtable for every supertrait that is a prefix of the vtable)
 - #165568 (rustdoc: Suggest corrections for reference label typos)
 - #165924 (rustc_codegen_gcc subtree update 2026-11-13)
 - #165927 (Remove `const_struct` from `rustc_codegen_ssa`)
 - #164362 (Emit note for `non_exhaustive` within defining crate for `unreachable_patterns`)
 - #164997 (Fix as str suggestion in subpattern)
 - #165825 (make `Complex<x87_f80>` ABI-compatible with C)
 - #165868 (Small changes to dyn compatibility)
 - #165879 (Add `#[rustc_test_entrypoint_marker]` back !)
 - #165903 (Fix borrowck ICE when a borrow outlives a local in a const block)
 - #165914 (Use `trim_prefix` in bootstrap)
 - #165919 (tests: accept better behavior on underaligned accesses)
 - #165936 (Enhance documentation for try_clone File implementation)
Zalathar added a commit to Zalathar/rust that referenced this pull request Nov 14, 2026
…orn3

Remove `const_struct` from `rustc_codegen_ssa`

It's unused outside of `rustc_codegen_llvm`/`rustc_codegen_gcc`, and shouldn't be used in future in `rustc_codegen_ssa` to help allow backends that don't support immediate aggregate types to use `rustc_codegen_ssa` in the future.

r? @bjorn3
rust-bors Bot pushed a commit that referenced this pull request Nov 14, 2026
Rollup of 16 pull requests

Successful merges:

 - #160618 (require a consistent codegen backend when -Zllvm-target-feature is present)
 - #164043 (alloc: Unstably add `Vec::repeat` and `Vec::repeat_in`)
 - #164823 (Use `DerefMut` and `IndexMut` before `&raw mut` autoborrow)
 - #165475 (Add a `!type` annotation to a vtable for every supertrait that is a prefix of the vtable)
 - #165568 (rustdoc: Suggest corrections for reference label typos)
 - #165924 (rustc_codegen_gcc subtree update 2026-11-13)
 - #165927 (Remove `const_struct` from `rustc_codegen_ssa`)
 - #164362 (Emit note for `non_exhaustive` within defining crate for `unreachable_patterns`)
 - #164997 (Fix as str suggestion in subpattern)
 - #165825 (make `Complex<x87_f80>` ABI-compatible with C)
 - #165868 (Small changes to dyn compatibility)
 - #165879 (Add `#[rustc_test_entrypoint_marker]` back !)
 - #165903 (Fix borrowck ICE when a borrow outlives a local in a const block)
 - #165914 (Use `trim_prefix` in bootstrap)
 - #165919 (tests: accept better behavior on underaligned accesses)
 - #165936 (Enhance documentation for try_clone File implementation)
@Zalathar

Copy link
Copy Markdown
Member

@bors try jobs=test-aarch64-msvc-1

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Nov 14, 2026
Remove `const_struct` from `rustc_codegen_ssa`


try-job: test-aarch64-msvc-1
@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 Nov 14, 2026
@rust-bors

rust-bors Bot commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

💔 Test for b9433eb failed: CI. Failed job:

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] find_msvc_tools test:false 1.176
[RUSTC-TIMING] cc test:false 1.418
   Compiling compiler_builtins v0.1.160 (C:\a\rust\rust\library\compiler-builtins\compiler-builtins)
[RUSTC-TIMING] build_script_build test:false 0.634
Assertion failed: E <= end() && "Trying to erase past the end.", file C:\a\rust\rust\src\llvm-project\llvm\include\llvm/ADT/TinyPtrVector.h, line 270
[RUSTC-TIMING] core test:false 27.950
error: could not compile `core` (lib)

Caused by:
  process didn't exit successfully: `C:\a\rust\rust\build\bootstrap\debug\rustc 'C:\a\rust\rust\build\bootstrap\debug\rustc' --crate-name core --edition=2024 'library\core\src\lib.rs' --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat,unused-externs-silent --crate-type lib --emit=dep-info,metadata,link -Z embed-metadata=no -C opt-level=3 -C embed-bitcode=no -C codegen-units=1 --warn=unexpected_cfgs --check-cfg 'cfg(no_fp_fmt_parse)' --check-cfg 'cfg(feature, values(any()))' --check-cfg 'cfg(target_has_reliable_f16)' --check-cfg 'cfg(target_has_reliable_f16_math)' --check-cfg 'cfg(target_has_reliable_f16b)' --check-cfg 'cfg(target_has_reliable_f128)' --check-cfg 'cfg(target_has_reliable_f128_math)' --check-cfg 'cfg(no_io_statics)' -Cembed-bitcode=yes -Zunstable-options -Cforce-frame-pointers=non-leaf -C debug-assertions=on --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("debug_refcell", "optimize_for_size", "panic_immediate_abort"))' -C metadata=be032579fe0883de -C extra-filename=-4b1355948afd9fb6 --out-dir 'C:\a\rust\rust\build\aarch64-pc-windows-msvc\stage1-std\aarch64-pc-windows-msvc\dist\build\core/4b1355948afd9fb6\out' --target aarch64-pc-windows-msvc -L 'dependency=C:\a\rust\rust\build\aarch64-pc-windows-msvc\stage1-std\dist\build\core/4b1355948afd9fb6\out' -Zannotate-moves '--check-cfg=cfg(feature,values(any()))' -Zunstable-options -Zmacro-backtrace -Csplit-debuginfo=packed -Ctarget-feature=+crt-static -Cprefer-dynamic -Zinline-mir -Zinline-mir-preserve-debug -Zmir_strip_debuginfo=locals-in-tiny-functions -Alinker-messages '-Zcrate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/")' -Z binary-dep-depinfo --force-warn=unused_crate_dependencies` (exit code: 0xc000001d, STATUS_ILLEGAL_INSTRUCTION)
warning: build failed, waiting for other jobs to finish...
Assertion failed: E <= end() && "Trying to erase past the end.", file C:\a\rust\rust\src\llvm-project\llvm\include\llvm/ADT/TinyPtrVector.h, line 270
[RUSTC-TIMING] compiler_builtins test:false 8.131
error: could not compile `compiler_builtins` (lib)

Caused by:
  process didn't exit successfully: `C:\a\rust\rust\build\bootstrap\debug\rustc 'C:\a\rust\rust\build\bootstrap\debug\rustc' --crate-name compiler_builtins --edition=2024 'library\compiler-builtins\compiler-builtins\src\lib.rs' --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat,unused-externs-silent --crate-type lib --emit=dep-info,metadata,link -Z embed-metadata=no -C opt-level=3 -C embed-bitcode=no -C codegen-units=10000 -Cembed-bitcode=yes -Zunstable-options -Cforce-frame-pointers=non-leaf -C debug-assertions=on --cfg 'feature="arch"' --cfg 'feature="c"' --cfg 'feature="compiler-builtins"' --cfg 'feature="default"' --cfg 'feature="unmangled-names"' --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("arch", "c", "compiler-builtins", "default", "mem", "unmangled-names", "unstable-public-internals"))' -C metadata=844a2a35e6b22282 -C extra-filename=-6ae01e573b57cacb --out-dir 'C:\a\rust\rust\build\aarch64-pc-windows-msvc\stage1-std\aarch64-pc-windows-msvc\dist\build\compiler_builtins/6ae01e573b57cacb\out' --target aarch64-pc-windows-msvc -L 'dependency=C:\a\rust\rust\build\aarch64-pc-windows-msvc\stage1-std\dist\build\compiler_builtins/6ae01e573b57cacb\out' --extern 'core=C:\a\rust\rust\build\aarch64-pc-windows-msvc\stage1-std\aarch64-pc-windows-msvc\dist\build\core/4b1355948afd9fb6\out\libcore-4b1355948afd9fb6.rmeta' -Zannotate-moves '--check-cfg=cfg(feature,values(any()))' -Zunstable-options -Zmacro-backtrace -Csplit-debuginfo=packed -Ctarget-feature=+crt-static -Cprefer-dynamic -Zinline-mir -Zinline-mir-preserve-debug -Zmir_strip_debuginfo=locals-in-tiny-functions -Alinker-messages '-Zcrate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/")' -Z binary-dep-depinfo --force-warn=unused_crate_dependencies -L 'native=C:\a\rust\rust\build\aarch64-pc-windows-msvc\stage1-std\aarch64-pc-windows-msvc\dist\build\compiler_builtins/c929816aef3eae97\out' -L 'native=C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.52.37025\atlmfc\lib\arm64' -l static=compiler-rt --cfg intrinsics_enabled --cfg optimizations_enabled --cfg f16_enabled --cfg f128_enabled --cfg mem_unaligned --cfg '__absvdi2="optimized-c"' --cfg '__absvsi2="optimized-c"' --cfg '__absvti2="optimized-c"' --cfg '__addvdi3="optimized-c"' --cfg '__addvsi3="optimized-c"' --cfg '__addvti3="optimized-c"' --cfg '__cmpdi2="optimized-c"' --cfg '__cmpti2="optimized-c"' --cfg '__fe_getround="optimized-c"' --cfg '__fe_raise_inexact="optimized-c"' --cfg '__ffsti2="optimized-c"' --cfg '__int_util="optimized-c"' --cfg '__mulvdi3="optimized-c"' --cfg '__mulvsi3="optimized-c"' --cfg '__mulvti3="optimized-c"' --cfg '__negdf2="optimized-c"' --cfg '__negdi2="optimized-c"' --cfg '__negsf2="optimized-c"' --cfg '__negti2="optimized-c"' --cfg '__negvdi2="optimized-c"' --cfg '__negvsi2="optimized-c"' --cfg '__negvti2="optimized-c"' --cfg '__paritydi2="optimized-c"' --cfg '__paritysi2="optimized-c"' --cfg '__parityti2="optimized-c"' --cfg '__popcountdi2="optimized-c"' --cfg '__popcountsi2="optimized-c"' --cfg '__popcountti2="optimized-c"' --cfg '__subvdi3="optimized-c"' --cfg '__subvsi3="optimized-c"' --cfg '__subvti3="optimized-c"' --cfg '__ucmpdi2="optimized-c"' --cfg '__ucmpti2="optimized-c"' --check-cfg 'cfg(thumb)' --check-cfg 'cfg(thumb1_only)' --check-cfg 'cfg(target_abi_eabihf)' --check-cfg 'cfg(x86_no_sse2)' --check-cfg 'cfg(target_feature, values("vfp2sp", "vfp2"))' --check-cfg 'cfg(assert_no_panic)' --check-cfg 'cfg(intrinsics_enabled)' --check-cfg 'cfg(optimizations_enabled)' --check-cfg 'cfg(f16_enabled)' --check-cfg 'cfg(f128_enabled)' --check-cfg 'cfg(__ashldi3, values("optimized-c"))' --check-cfg 'cfg(__ashlsi3, values("optimized-c"))' --check-cfg 'cfg(__ashrdi3, values("optimized-c"))' --check-cfg 'cfg(__ashrsi3, values("optimized-c"))' --check-cfg 'cfg(__bswapsi2, values("optimized-c"))' --check-cfg 'cfg(__bswapdi2, values("optimized-c"))' --check-cfg 'cfg(__bswapti2, values("optimized-c"))' --check-cfg 'cfg(__divdi3, values("optimized-c"))' --check-cfg 'cfg(__divsi3, values("optimized-c"))' --check-cfg 'cfg(__divmoddi4, values("optimized-c"))' --check-cfg 'cfg(__divmodsi4, values("optimized-c"))' --check-cfg 'cfg(__divmodsi4, values("optimized-c"))' --check-cfg 'cfg(__divmodti4, values("optimized-c"))' --check-cfg 'cfg(__lshrdi3, values("optimized-c"))' --check-cfg 'cfg(__lshrsi3, values("optimized-c"))' --check-cfg 'cfg(__moddi3, values("optimized-c"))' --check-cfg 'cfg(__modsi3, values("optimized-c"))' --check-cfg 'cfg(__muldi3, values("optimized-c"))' --check-cfg 'cfg(__udivdi3, values("optimized-c"))' --check-cfg 'cfg(__udivmoddi4, values("optimized-c"))' --check-cfg 'cfg(__udivmodsi4, values("optimized-c"))' --check-cfg 'cfg(__udivsi3, values("optimized-c"))' --check-cfg 'cfg(__umoddi3, values("optimized-c"))' --check-cfg 'cfg(__umodsi3, values("optimized-c"))' --check-cfg 'cfg(target_feature, values("vis3"))' --check-cfg 'cfg(mem_unaligned)' --check-cfg 'cfg(kernel_user_helpers)'` (exit code: 0xc000001d, STATUS_ILLEGAL_INSTRUCTION)
Bootstrap failed while executing `test --stage 2 --skip=compiler --skip=src`
Currently active steps:
compile::Assemble { target_compiler: Compiler { stage: 2, host: aarch64-pc-windows-msvc, forced_compiler: false } } at src\bootstrap\src\core\build_steps\test.rs:2032
compile::Rustc { target: aarch64-pc-windows-msvc, build_compiler: Compiler { stage: 1, host: aarch64-pc-windows-msvc, forced_compiler: false }, crates: [] } at src\bootstrap\src\core\build_steps\compile.rs:2343
compile::Std { target: aarch64-pc-windows-msvc, build_compiler: Compiler { stage: 1, host: aarch64-pc-windows-msvc, forced_compiler: false }, crates: [], force_recompile: false, extra_rust_args: [], is_for_mir_opt_tests: false } at src\bootstrap\src\core\build_steps\compile.rs:1064
Build completed unsuccessfully in 0:29:46
make: *** [Makefile:108: ci-msvc-py] Error 1
  local time: Fri Nov 13 18:27:16 PST 2026
  network time: Sat, 14 Nov 2026 02:27:16 GMT
##[error]Process completed with exit code 2.
##[group]Run echo "disk usage:"
echo "disk usage:"

This branch has not been deployed

No deployments
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-author Status: This is awaiting some action (such as code changes or more information) from the author. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

6 participants