]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_middle/src/ty/error.rs
Auto merge of #105323 - cjgillot:simplify-const-prop, r=davidtwco
[rust.git] / compiler / rustc_middle / src / ty / error.rs
index 14d07608a780e6c5b33b6dbae204401251b39088..50554cf9a82c85e7e53112ae0da4e6a3bb723f6e 100644 (file)
@@ -457,7 +457,7 @@ pub fn note_and_explain_type_err(
                             .def_id
                             .as_local()
                             .map(|id| hir.local_def_id_to_hir_id(id))
-                            .and_then(|id| self.hir().find(self.hir().get_parent_node(id)))
+                            .and_then(|id| self.hir().find_parent(id))
                             .as_ref()
                             .and_then(|node| node.generics())
                         {