Rollup merge of #110873 - clubby789:migrate-rustc-parse-trivial, r=compiler-errors
Migrate trivially translatable `rustc_parse` diagnostics cc #100717 Migrate diagnostics in `rustc_parse` which are emitted in a single statement. I worked on this by expanding the lint introduced in #108760, although that isn't included here as there is much more work to be done to satisfy it
This commit is contained in:
commit
29f5ec3640
17 changed files with 443 additions and 231 deletions
|
@ -2976,7 +2976,7 @@ pub enum ItemKind {
|
|||
}
|
||||
|
||||
impl ItemKind {
|
||||
pub fn article(&self) -> &str {
|
||||
pub fn article(&self) -> &'static str {
|
||||
use ItemKind::*;
|
||||
match self {
|
||||
Use(..) | Static(..) | Const(..) | Fn(..) | Mod(..) | GlobalAsm(..) | TyAlias(..)
|
||||
|
@ -2985,7 +2985,7 @@ impl ItemKind {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn descr(&self) -> &str {
|
||||
pub fn descr(&self) -> &'static str {
|
||||
match self {
|
||||
ItemKind::ExternCrate(..) => "extern crate",
|
||||
ItemKind::Use(..) => "`use` import",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue