Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0d56e34

Browse files
committedSep 11, 2022
Auto merge of #101678 - jannic:fix-101640, r=jyn514
Add diagnostic arg 'current_crate' With this fix, I get almost the same error message as on stable, again. However, I expected to get the new error message `std is required by {$current_crate} because it does not declare #![no_std]`, but I didn't. Instead, I got a new line `help: consider building the standard library from source with cargo build -Zbuild-std`. So I obviously do not fully understand what is going on. In any case, the bug itself seems to be fixed by this patch. Closes #101640
2 parents 17a627f + 156717d commit 0d56e34

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
 

‎compiler/rustc_metadata/src/errors.rs

+1
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,7 @@ impl SessionDiagnostic<'_> for CannotFindCrate {
572572
) -> rustc_errors::DiagnosticBuilder<'_, ErrorGuaranteed> {
573573
let mut diag = handler.struct_err(rustc_errors::fluent::metadata::cannot_find_crate);
574574
diag.set_arg("crate_name", self.crate_name);
575+
diag.set_arg("current_crate", self.current_crate);
575576
diag.set_arg("add_info", self.add_info);
576577
diag.set_arg("locator_triple", self.locator_triple.triple());
577578
diag.code(error_code!(E0463));

0 commit comments

Comments
 (0)
Please sign in to comment.