Annotate some bugs

This commit is contained in:
Michael Goulet
2023-12-15 03:19:46 +00:00
parent 96df494340
commit 70b9dad3dc
34 changed files with 295 additions and 197 deletions

View File

@@ -285,7 +285,7 @@ impl<'cx, 'tcx> FallibleTypeFolder<TyCtxt<'tcx>> for QueryNormalizer<'cx, 'tcx>
ty::Projection => tcx.normalize_projection_ty(c_data),
ty::Weak => tcx.normalize_weak_ty(c_data),
ty::Inherent => tcx.normalize_inherent_projection_ty(c_data),
_ => unreachable!(),
kind => unreachable!("did not expect {kind:?} due to match arm above"),
}?;
// We don't expect ambiguity.
if !result.value.is_proven() {

View File

@@ -184,7 +184,9 @@ pub fn compute_implied_outlives_bounds_inner<'tcx>(
push_outlives_components(tcx, ty_a, &mut components);
implied_bounds.extend(implied_bounds_from_components(r_b, components))
}
ty::GenericArgKind::Const(_) => unreachable!(),
ty::GenericArgKind::Const(_) => {
unreachable!("consts do not participate in outlives bounds")
}
}
}