Skip to content

Commit 2180127

Browse files
tgross35Amanieu
andcommitted
Verify that the correct crate was resolved
Co-authored-by: Amanieu d'Antras <amanieu@gmail.com>
1 parent 88b1315 commit 2180127

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

compiler/rustc_metadata/src/creader.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,11 +1040,13 @@ impl<'a, 'tcx> CrateLoader<'a, 'tcx> {
10401040
return;
10411041
}
10421042

1043-
let res = self.maybe_resolve_crate(
1043+
let Some(cnum) = self.resolve_crate(
10441044
sym::compiler_builtins,
10451045
CrateDepKind::Implicit,
10461046
CrateOrigin::Injected,
1047-
);
1047+
) else {
1048+
return;
1049+
};
10481050

10491051
if res.is_ok() {
10501052
info!("`compiler_builtins` found");

0 commit comments

Comments
 (0)