diff options
| author | Noah Lev <camelidcamel@gmail.com> | 2024-08-09 20:43:30 -0700 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2024-10-04 23:28:22 +0000 |
| commit | d6f247f3d52f529e7145eb355ac9660a49d0d8c9 (patch) | |
| tree | 40a82d7ef14a8c598b863abac21d78796fa98558 /compiler/rustc_lint/src/async_fn_in_trait.rs | |
| parent | 4ec7839afa30aae41ee01326b0273ca1ba8e027b (diff) | |
| download | rust-d6f247f3d52f529e7145eb355ac9660a49d0d8c9.tar.gz rust-d6f247f3d52f529e7145eb355ac9660a49d0d8c9.zip | |
rm `ItemKind::OpaqueTy`
This introduce an additional collection of opaques on HIR, as they can no longer be listed using the free item list.
Diffstat (limited to 'compiler/rustc_lint/src/async_fn_in_trait.rs')
| -rw-r--r-- | compiler/rustc_lint/src/async_fn_in_trait.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rustc_lint/src/async_fn_in_trait.rs b/compiler/rustc_lint/src/async_fn_in_trait.rs index d9040207300..63a8a949e96 100644 --- a/compiler/rustc_lint/src/async_fn_in_trait.rs +++ b/compiler/rustc_lint/src/async_fn_in_trait.rs @@ -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( |
