Skip to content

Commit 1bef605

Browse files
committed
fix(debuginfo): disable overflow check for
recursive non-enum types
1 parent 0fb279b commit 1bef605

File tree

1 file changed

+2
-2
lines changed
  • compiler/rustc_codegen_llvm/src/debuginfo/metadata

1 file changed

+2
-2
lines changed

compiler/rustc_codegen_llvm/src/debuginfo/metadata/type_map.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,8 @@ pub(super) fn build_type_with_children<'ll, 'tcx>(
285285
// Item(T),
286286
// }
287287
// ```
288-
let is_expanding_recursive =
289-
debug_context(cx).adt_stack.borrow().iter().any(|(parent_def_id, parent_args)| {
288+
let is_expanding_recursive = adt_def.is_enum()
289+
&& debug_context(cx).adt_stack.borrow().iter().any(|(parent_def_id, parent_args)| {
290290
if def_id == *parent_def_id {
291291
args.iter().zip(parent_args.iter()).any(|(arg, parent_arg)| {
292292
if let (Some(arg), Some(parent_arg)) = (arg.as_type(), parent_arg.as_type())

0 commit comments

Comments
 (0)