From b929f721198c9c9467c0a427a23a974be0baa0d4 Mon Sep 17 00:00:00 2001 From: Dan Aloni Date: Sat, 11 Jul 2020 11:03:54 +0300 Subject: [PATCH] Fix try_print_visible_def_path_recur for opt_def_id usage This to fix #74081. --- src/librustc_middle/ty/print/pretty.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustc_middle/ty/print/pretty.rs b/src/librustc_middle/ty/print/pretty.rs index 9dda208b5a0da..3809c8d245bbe 100644 --- a/src/librustc_middle/ty/print/pretty.rs +++ b/src/librustc_middle/ty/print/pretty.rs @@ -393,7 +393,7 @@ pub trait PrettyPrinter<'tcx>: .tcx() .item_children(visible_parent) .iter() - .find(|child| child.res.def_id() == def_id) + .find(|child| child.res.opt_def_id() == Some(def_id)) .map(|child| child.ident.name); if let Some(reexport) = reexport { *name = reexport;