Reorder check_item_type diagnostics so they occur next to the corresponding check_well_formed diagnostics

This commit is contained in:
Oli Scherer
2023-10-26 11:36:49 +00:00
parent dd2dee1c70
commit cd4c352fb4
36 changed files with 362 additions and 285 deletions

View File

@@ -172,7 +172,7 @@ fn check_item<'tcx>(tcx: TyCtxt<'tcx>, item: &'tcx hir::Item<'tcx>) -> Result<()
item.name = ? tcx.def_path_str(def_id)
);
match item.kind {
let res = match item.kind {
// Right now we check that every default trait implementation
// has an implementation of itself. Basically, a case like:
//
@@ -271,7 +271,11 @@ fn check_item<'tcx>(tcx: TyCtxt<'tcx>, item: &'tcx hir::Item<'tcx>) -> Result<()
}
}
_ => Ok(()),
}
};
crate::check::check::check_item_type(tcx, def_id);
res
}
fn check_foreign_item(tcx: TyCtxt<'_>, item: &hir::ForeignItem<'_>) -> Result<(), ErrorGuaranteed> {