Skip to content

Commit 1e4adaf

Browse files
committed
Fix CrateLocationUnknownType error
1 parent c5d82ed commit 1e4adaf

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

compiler/rustc_metadata/src/errors.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,7 @@ pub struct CrateLocationUnknownType<'a> {
692692
#[primary_span]
693693
pub span: Span,
694694
pub path: &'a Path,
695+
pub crate_name: Symbol,
695696
}
696697

697698
#[derive(Diagnostic)]

compiler/rustc_metadata/src/locator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@ impl CrateError {
10241024
if !locator.crate_rejections.via_filename.is_empty() {
10251025
let mismatches = locator.crate_rejections.via_filename.iter();
10261026
for CrateMismatch { path, .. } in mismatches {
1027-
sess.emit_err(CrateLocationUnknownType { span, path: &path });
1027+
sess.emit_err(CrateLocationUnknownType { span, path: &path, crate_name });
10281028
sess.emit_err(LibFilenameForm {
10291029
span,
10301030
dll_prefix: &locator.dll_prefix,

0 commit comments

Comments
 (0)