From 34ea5d02ddaacfedd2d60460bf080b988b941d94 Mon Sep 17 00:00:00 2001 From: Bastian Kauschke Date: Fri, 20 Nov 2020 17:03:12 +0100 Subject: [PATCH] const_generics: assert resolve hack causes an error --- compiler/rustc_resolve/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs index d18335ef2e63a..e8a06265adaf3 100644 --- a/compiler/rustc_resolve/src/lib.rs +++ b/compiler/rustc_resolve/src/lib.rs @@ -2539,6 +2539,7 @@ impl<'a> Resolver<'a> { span: Span, all_ribs: &[Rib<'a>], ) -> Res { + const CG_BUG_STR: &str = "min_const_generics resolve check didn't stop compilation"; debug!("validate_res_from_ribs({:?})", res); let ribs = &all_ribs[rib_index + 1..]; @@ -2639,6 +2640,8 @@ impl<'a> Resolver<'a> { }, ); } + + self.session.delay_span_bug(span, CG_BUG_STR); return Res::Err; } } @@ -2720,6 +2723,8 @@ impl<'a> Resolver<'a> { }, ); } + + self.session.delay_span_bug(span, CG_BUG_STR); return Res::Err; }