Skip to content

Commit

Permalink
const_generics: assert resolve hack causes an error
Browse files Browse the repository at this point in the history
  • Loading branch information
lcnr committed Nov 20, 2020
1 parent ae6aa22 commit 34ea5d0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions compiler/rustc_resolve/src/lib.rs
Expand Up @@ -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..];

Expand Down Expand Up @@ -2639,6 +2640,8 @@ impl<'a> Resolver<'a> {
},
);
}

self.session.delay_span_bug(span, CG_BUG_STR);
return Res::Err;
}
}
Expand Down Expand Up @@ -2720,6 +2723,8 @@ impl<'a> Resolver<'a> {
},
);
}

self.session.delay_span_bug(span, CG_BUG_STR);
return Res::Err;
}

Expand Down

0 comments on commit 34ea5d0

Please sign in to comment.