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 0aaa6f1

Browse files
committedJul 23, 2024·
Do not use question as label
We don't want to have questions in the diagnostic output. Instead, we use wording that communicates uncertainty, like "might": ``` error[E0432]: unresolved import `spam` --> $DIR/import-from-missing-star-3.rs:2:9 | LL | use spam::*; | ^^^^ you might be missing crate `spam` | = help: consider adding `extern crate spam` to use the `spam` crate ```
1 parent 2a1c384 commit 0aaa6f1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+140
-132
lines changed
 

‎compiler/rustc_resolve/src/diagnostics.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2012,7 +2012,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
20122012
)
20132013
} else if ident.name == sym::core {
20142014
(
2015-
format!("maybe a missing crate `{ident}`?"),
2015+
format!("you might be missing crate `{ident}`"),
20162016
Some((
20172017
vec![(ident.span, "std".to_string())],
20182018
"try using `std` instead of `core`".to_string(),
@@ -2021,7 +2021,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
20212021
)
20222022
} else if self.tcx.sess.is_rust_2015() {
20232023
(
2024-
format!("maybe a missing crate `{ident}`?"),
2024+
format!("you might be missing crate `{ident}`"),
20252025
Some((
20262026
vec![],
20272027
format!(

‎tests/rustdoc-ui/ice-unresolved-import-100241.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0432]: unresolved import `inner`
22
--> $DIR/ice-unresolved-import-100241.rs:9:13
33
|
44
LL | pub use inner::S;
5-
| ^^^^^ maybe a missing crate `inner`?
5+
| ^^^^^ you might be missing crate `inner`
66
|
77
= help: consider adding `extern crate inner` to use the `inner` crate
88

0 commit comments

Comments
 (0)
Please sign in to comment.