Fix try_print_visible_def_path_recur for opt_def_id usage

This to fix #74081.
This commit is contained in:
Dan Aloni 2020-07-11 11:03:54 +03:00
parent e59b08e62e
commit b929f72119

View File

@ -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;