Skip to content

Commit b929f72

Browse files
committed
Fix try_print_visible_def_path_recur for opt_def_id usage
This to fix rust-lang#74081.
1 parent e59b08e commit b929f72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_middle/ty/print/pretty.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ pub trait PrettyPrinter<'tcx>:
393393
.tcx()
394394
.item_children(visible_parent)
395395
.iter()
396-
.find(|child| child.res.def_id() == def_id)
396+
.find(|child| child.res.opt_def_id() == Some(def_id))
397397
.map(|child| child.ident.name);
398398
if let Some(reexport) = reexport {
399399
*name = reexport;

0 commit comments

Comments
 (0)