rm ItemKind::OpaqueTy

This introduce an additional collection of opaques on HIR, as they can no
longer be listed using the free item list.
This commit is contained in:
Noah Lev
2024-08-09 20:43:30 -07:00
committed by Camille GILLOT
parent 4ec7839afa
commit d6f247f3d5
45 changed files with 306 additions and 368 deletions

View File

@@ -104,8 +104,9 @@ impl<'tcx> LateLintPass<'tcx> for AsyncFnInTrait {
return;
}
let hir::FnRetTy::Return(hir::Ty { kind: hir::TyKind::OpaqueDef(def, ..), .. }) =
sig.decl.output
let hir::FnRetTy::Return(hir::Ty {
kind: hir::TyKind::OpaqueDef(opaq_def, ..), ..
}) = sig.decl.output
else {
// This should never happen, but let's not ICE.
return;
@@ -114,7 +115,7 @@ impl<'tcx> LateLintPass<'tcx> for AsyncFnInTrait {
cx.tcx,
sig,
body,
def.owner_id.def_id,
opaq_def.def_id,
" + Send",
);
cx.tcx.emit_node_span_lint(