about summary refs log tree commit diff
path: root/compiler/rustc_lint/src/impl_trait_overcaptures.rs
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2024-10-14 17:04:43 +0200
committerRalf Jung <post@ralfj.de>2024-10-14 17:04:43 +0200
commit9d579f5358d6722fa20cbf243e201defbd5d84b3 (patch)
tree456828aefcdd5ca1414414fdb876f8c528d82dff /compiler/rustc_lint/src/impl_trait_overcaptures.rs
parent5e6170b97f81b83041666170ceeadefe04d00fb4 (diff)
parent17a19e684cdf3ca088af8b4da6a6209d128913f4 (diff)
Merge from rustc
Diffstat (limited to 'compiler/rustc_lint/src/impl_trait_overcaptures.rs')
-rw-r--r--compiler/rustc_lint/src/impl_trait_overcaptures.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_lint/src/impl_trait_overcaptures.rs b/compiler/rustc_lint/src/impl_trait_overcaptures.rs
index 5aeaad42069..d029ad93407 100644
--- a/compiler/rustc_lint/src/impl_trait_overcaptures.rs
+++ b/compiler/rustc_lint/src/impl_trait_overcaptures.rs
@@ -258,7 +258,7 @@ where
             && self.seen.insert(opaque_def_id)
             // If it's owned by this function
             && let opaque =
-                self.tcx.hir_node_by_def_id(opaque_def_id).expect_item().expect_opaque_ty()
+                self.tcx.hir_node_by_def_id(opaque_def_id).expect_opaque_ty()
             && let hir::OpaqueTyOrigin::FnReturn { parent, .. } = opaque.origin
             && parent == self.parent_def_id
         {