Files
rust/compiler/rustc_codegen_llvm
Jonathan Brouwer 19ec103422 Rollup merge of #160390 - Dnreikronos:autodiff/slice_dst_typetree, r=oli-obk
autodiff: Handle slice-tailed DSTs in type trees

Fixes rust-lang/rust#160327

References to `OsStr` reach a `[u8]` tail, but autodiff only recognized direct slices. TypeTree generation then recursed into `OsStr` and hit the slice arm that ICEd.

TypeTree generation and ABI activity handling now use `struct_tail_for_codegen`. Slice wrappers keep their element metadata, while prefixed DSTs retain their field offsets. IMO, reusing the existing rustc DST-tail query is cleaner than adding an `OsStr` special case. BTW, coverage includes the reduced `clap_lex` reproducer plus a prefixed slice-tail DST.
2026-08-05 13:36:14 +02:00
..
…

The codegen crate contains the code to convert from MIR into LLVM IR, and then from LLVM IR into machine code. In general it contains code that runs towards the end of the compilation process.

For more information about how codegen works, see the rustc dev guide.