X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_middle%2Fsrc%2Fty%2Ferror.rs;h=50554cf9a82c85e7e53112ae0da4e6a3bb723f6e;hb=b1691f6413a4afd7529ab309965123cc63e82021;hp=e1aa7fea441cdde9df8701cc3523f402173c10fb;hpb=a313ef05a78330ac342cddf819214cb6414164e2;p=rust.git diff --git a/compiler/rustc_middle/src/ty/error.rs b/compiler/rustc_middle/src/ty/error.rs index e1aa7fea441..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().parent_id(id))) + .and_then(|id| self.hir().find_parent(id)) .as_ref() .and_then(|node| node.generics()) {