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 ```
This commit is contained in:
parent
6106b05b27
commit
850faea030
44 changed files with 156 additions and 148 deletions
|
@ -2012,7 +2012,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
|
|||
)
|
||||
} else if ident.name == sym::core {
|
||||
(
|
||||
format!("maybe a missing crate `{ident}`?"),
|
||||
format!("you might be missing crate `{ident}`"),
|
||||
Some((
|
||||
vec![(ident.span, "std".to_string())],
|
||||
"try using `std` instead of `core`".to_string(),
|
||||
|
@ -2021,7 +2021,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
|
|||
)
|
||||
} else if self.tcx.sess.is_rust_2015() {
|
||||
(
|
||||
format!("maybe a missing crate `{ident}`?"),
|
||||
format!("you might be missing crate `{ident}`"),
|
||||
Some((
|
||||
vec![],
|
||||
format!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue