1
Fork 0

Fix ICE when negative impl is collected during eager mono

This commit is contained in:
Gary Guo 2022-11-04 03:08:28 +00:00
parent 215e3cd218
commit 1013ee8df5
2 changed files with 16 additions and 0 deletions

View file

@ -1336,6 +1336,10 @@ fn create_mono_items_for_default_impls<'tcx>(
) {
match item.kind {
hir::ItemKind::Impl(ref impl_) => {
if matches!(impl_.polarity, hir::ImplPolarity::Negative(_)) {
return;
}
for param in impl_.generics.params {
match param.kind {
hir::GenericParamKind::Lifetime { .. } => {}