X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_middle%2Fsrc%2Fty%2Ferror.rs;h=50554cf9a82c85e7e53112ae0da4e6a3bb723f6e;hb=b1691f6413a4afd7529ab309965123cc63e82021;hp=14d07608a780e6c5b33b6dbae204401251b39088;hpb=cb9bcafe0d5128d6381a836f7640c4de74ad64b3;p=rust.git diff --git a/compiler/rustc_middle/src/ty/error.rs b/compiler/rustc_middle/src/ty/error.rs index 14d07608a78..50554cf9a82 100644 --- a/compiler/rustc_middle/src/ty/error.rs +++ b/compiler/rustc_middle/src/ty/error.rs @@ -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()) {