Auto merge of #1960 - RalfJung:rustup, r=RalfJung

rustup

Cc https://github.com/rust-lang/rust/issues/92691
This commit is contained in:
bors 2022-01-09 13:50:34 +00:00
commit c8b3cf0060
2 changed files with 3 additions and 3 deletions

View File

@ -1 +1 @@
66f64a441a05cee8d5d701477b43ed851f778f3a e19ca1d946269f7b7eb13171531caf2e16f42076

View File

@ -27,7 +27,7 @@ fn try_resolve_did<'mir, 'tcx>(tcx: TyCtxt<'tcx>, path: &[&str]) -> Option<DefId
tcx.crates(()).iter().find(|&&krate| tcx.crate_name(krate).as_str() == path[0]).and_then( tcx.crates(()).iter().find(|&&krate| tcx.crate_name(krate).as_str() == path[0]).and_then(
|krate| { |krate| {
let krate = DefId { krate: *krate, index: CRATE_DEF_INDEX }; let krate = DefId { krate: *krate, index: CRATE_DEF_INDEX };
let mut items = tcx.item_children(krate); let mut items = tcx.module_children(krate);
let mut path_it = path.iter().skip(1).peekable(); let mut path_it = path.iter().skip(1).peekable();
while let Some(segment) = path_it.next() { while let Some(segment) = path_it.next() {
@ -37,7 +37,7 @@ fn try_resolve_did<'mir, 'tcx>(tcx: TyCtxt<'tcx>, path: &[&str]) -> Option<DefId
return Some(item.res.def_id()); return Some(item.res.def_id());
} }
items = tcx.item_children(item.res.def_id()); items = tcx.module_children(item.res.def_id());
break; break;
} }
} }