Add IMPLIED_BOUNDS_ENTAILMENT lint

This commit is contained in:
Michael Goulet
2022-12-11 21:16:43 +00:00
parent 4653c93e44
commit 96154d7fa7
8 changed files with 203 additions and 7 deletions

View File

@@ -1693,7 +1693,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
&self,
generic_param_scope: LocalDefId,
outlives_env: &OutlivesEnvironment<'tcx>,
) {
) -> Option<ErrorGuaranteed> {
let errors = self.resolve_regions(outlives_env);
if let None = self.tainted_by_errors() {
@@ -1704,6 +1704,10 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
// errors from silly ones.
self.report_region_errors(generic_param_scope, &errors);
}
(!errors.is_empty()).then(|| {
self.tcx.sess.delay_span_bug(rustc_span::DUMMY_SP, "error should have been emitted")
})
}
// [Note-Type-error-reporting]