Prevent the creation of TraitRef without dedicated methods

This commit is contained in:
Oli Scherer
2022-12-13 11:18:58 +00:00
parent a5cd3bde95
commit 6af3638709
9 changed files with 44 additions and 47 deletions

View File

@@ -570,7 +570,7 @@ fn check_item_type<'tcx>(tcx: TyCtxt<'tcx>, id: hir::ItemId) {
assoc_item,
assoc_item,
default.span,
ty::TraitRef { def_id: it.owner_id.to_def_id(), substs: trait_substs },
tcx.mk_trait_ref(it.owner_id.to_def_id(), trait_substs),
);
}
_ => {}