Skip to content

Commit 4b2f05f

Browse files
author
Carolyn Zech
committed
update to 6/4
1 parent 0209e8e commit 4b2f05f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

kani-compiler/src/kani_middle/resolve.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,9 @@ fn resolve_relative(tcx: TyCtxt, current_module: LocalModDefId, name: &str) -> R
434434
let item = tcx.hir_item(item_id);
435435
if item.kind.ident().is_some_and(|ident| ident.as_str() == name) {
436436
match item.kind {
437-
ItemKind::Use(use_path, UseKind::Single(_)) => use_path.res[0].opt_def_id(),
437+
ItemKind::Use(use_path, UseKind::Single(_)) => {
438+
use_path.res.present_items().filter_map(|res| res.opt_def_id()).next()
439+
}
438440
ItemKind::ExternCrate(orig_name, _) => resolve_external(
439441
tcx,
440442
orig_name.as_ref().map(|sym| sym.as_str()).unwrap_or(name),
@@ -445,7 +447,7 @@ fn resolve_relative(tcx: TyCtxt, current_module: LocalModDefId, name: &str) -> R
445447
if let ItemKind::Use(use_path, UseKind::Glob) = item.kind {
446448
// Do not immediately try to resolve the path using this glob,
447449
// since paths resolved via non-globs take precedence.
448-
glob_imports.push(use_path.res[0]);
450+
glob_imports.extend(use_path.res.present_items());
449451
}
450452
None
451453
}

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
# SPDX-License-Identifier: Apache-2.0 OR MIT
33

44
[toolchain]
5-
channel = "nightly-2025-06-03"
5+
channel = "nightly-2025-06-04"
66
components = ["llvm-tools", "rustc-dev", "rust-src", "rustfmt"]

0 commit comments

Comments
 (0)