Migrate trivially translatable rustc_parse diagnostics

This commit is contained in:
clubby789 2023-04-27 01:53:06 +01:00
parent 1c42cb4ef0
commit 1ce9d7254e
17 changed files with 443 additions and 231 deletions

View file

@ -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",