Skip to content

Commit 34ea5d0

Browse files
committed
const_generics: assert resolve hack causes an error
1 parent ae6aa22 commit 34ea5d0

File tree

1 file changed

+5
-0
lines changed
  • compiler/rustc_resolve/src

1 file changed

+5
-0
lines changed

compiler/rustc_resolve/src/lib.rs

+5
Original file line numberDiff line numberDiff line change
@@ -2539,6 +2539,7 @@ impl<'a> Resolver<'a> {
25392539
span: Span,
25402540
all_ribs: &[Rib<'a>],
25412541
) -> Res {
2542+
const CG_BUG_STR: &str = "min_const_generics resolve check didn't stop compilation";
25422543
debug!("validate_res_from_ribs({:?})", res);
25432544
let ribs = &all_ribs[rib_index + 1..];
25442545

@@ -2639,6 +2640,8 @@ impl<'a> Resolver<'a> {
26392640
},
26402641
);
26412642
}
2643+
2644+
self.session.delay_span_bug(span, CG_BUG_STR);
26422645
return Res::Err;
26432646
}
26442647
}
@@ -2720,6 +2723,8 @@ impl<'a> Resolver<'a> {
27202723
},
27212724
);
27222725
}
2726+
2727+
self.session.delay_span_bug(span, CG_BUG_STR);
27232728
return Res::Err;
27242729
}
27252730

0 commit comments

Comments
 (0)