Skip to content

Commit 56222cb

Browse files
committed
Address more concerns
1 parent d8aad82 commit 56222cb

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

compiler/rustc_ty_utils/src/needs_drop.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -400,16 +400,8 @@ fn drop_tys_helper<'tcx>(
400400
_ => vec![boxed_ty, allocator_ty],
401401
}
402402
}
403-
[boxed_ty] => {
404-
let boxed_ty = boxed_ty.expect_ty();
405-
match boxed_ty.kind() {
406-
ty::Dynamic(..) | ty::Error(_) => Vec::new(),
407-
_ => vec![boxed_ty],
408-
}
409-
}
410403
_ => {
411-
debug!(?args, "drop_tys_helper: `Box` has unexpected generic args");
412-
Vec::new()
404+
bug!("drop_tys_helper: `Box` has unexpected generic args: {args:?}");
413405
}
414406
};
415407
Ok(box_components)

0 commit comments

Comments
 (0)