Update for TyCtxt::crates() change

This commit is contained in:
hyd-dev 2021-07-02 16:08:27 +08:00
parent 61605ebde2
commit 76fe48543c
No known key found for this signature in database
GPG Key ID: 74FA7FD5B8DA14B8
2 changed files with 2 additions and 2 deletions

View File

@ -1 +1 @@
e98897e5dc9898707bf4331c43b2e76ab7e282fe
46ae6ee65df19c6a3fb683499c1203e749975e60

View File

@ -20,7 +20,7 @@ impl<'mir, 'tcx: 'mir> EvalContextExt<'mir, 'tcx> for crate::MiriEvalContext<'mi
/// Gets an instance for a path.
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| {
let krate = DefId { krate: *krate, index: CRATE_DEF_INDEX };
let mut items = tcx.item_children(krate);