Fix CrateLocationUnknownType error
This commit is contained in:
parent
c5d82ed7a4
commit
1e4adaf11f
@ -692,6 +692,7 @@ pub struct CrateLocationUnknownType<'a> {
|
|||||||
#[primary_span]
|
#[primary_span]
|
||||||
pub span: Span,
|
pub span: Span,
|
||||||
pub path: &'a Path,
|
pub path: &'a Path,
|
||||||
|
pub crate_name: Symbol,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Diagnostic)]
|
#[derive(Diagnostic)]
|
||||||
|
@ -1024,7 +1024,7 @@ impl CrateError {
|
|||||||
if !locator.crate_rejections.via_filename.is_empty() {
|
if !locator.crate_rejections.via_filename.is_empty() {
|
||||||
let mismatches = locator.crate_rejections.via_filename.iter();
|
let mismatches = locator.crate_rejections.via_filename.iter();
|
||||||
for CrateMismatch { path, .. } in mismatches {
|
for CrateMismatch { path, .. } in mismatches {
|
||||||
sess.emit_err(CrateLocationUnknownType { span, path: &path });
|
sess.emit_err(CrateLocationUnknownType { span, path: &path, crate_name });
|
||||||
sess.emit_err(LibFilenameForm {
|
sess.emit_err(LibFilenameForm {
|
||||||
span,
|
span,
|
||||||
dll_prefix: &locator.dll_prefix,
|
dll_prefix: &locator.dll_prefix,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user