Skip to content

Commit

Permalink
Fix try_print_visible_def_path_recur for opt_def_id usage
Browse files Browse the repository at this point in the history
This to fix rust-lang#74081.
  • Loading branch information
da-x committed Jul 11, 2020
1 parent e59b08e commit b929f72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc_middle/ty/print/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b929f72

Please sign in to comment.