Skip to content

Commit e06b5d4

Browse files
committed
Add fast path for ZSTs.
1 parent a3a56d7 commit e06b5d4

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • compiler/rustc_codegen_ssa/src/mir

compiler/rustc_codegen_ssa/src/mir/retag.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,10 @@ trait PerByteTracking<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> {
297297
layout: TyAndLayout<'tcx>,
298298
imprecise: bool,
299299
) {
300+
if !layout.is_sized() {
301+
return;
302+
}
303+
300304
if Self::excludes(bx, layout.ty) {
301305
return;
302306
}

0 commit comments

Comments
 (0)