Rollup merge of #128886 - GrigorenkoPV:untranslatable-diagnostic, r=nnethercote
Get rid of some `#[allow(rustc::untranslatable_diagnostic)]` `@rustbot` label +A-translation cc https://github.com/rust-lang/rust/issues/100717
This commit is contained in:
commit
ea74eff55c
23 changed files with 125 additions and 77 deletions
|
@ -1398,8 +1398,6 @@ fn pretty_printing_compatibility_hack(item: &Item, sess: &Session) {
|
|||
};
|
||||
|
||||
if crate_matches {
|
||||
// FIXME: make this translatable
|
||||
#[allow(rustc::untranslatable_diagnostic)]
|
||||
sess.dcx().emit_fatal(errors::ProcMacroBackCompat {
|
||||
crate_name: "rental".to_string(),
|
||||
fixed_version: "0.5.6".to_string(),
|
||||
|
|
|
@ -39,6 +39,7 @@ use crate::errors::{
|
|||
RecursionLimitReached, RemoveExprNotSupported, RemoveNodeNotSupported, UnsupportedKeyValue,
|
||||
WrongFragmentKind,
|
||||
};
|
||||
use crate::fluent_generated;
|
||||
use crate::mbe::diagnostics::annotate_err_with_kind;
|
||||
use crate::module::{mod_dir_path, parse_external_mod, DirOwnership, ParsedExternalMod};
|
||||
use crate::placeholders::{placeholder, PlaceholderExpander};
|
||||
|
@ -882,7 +883,6 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
|
|||
}
|
||||
|
||||
impl<'ast, 'a> Visitor<'ast> for GateProcMacroInput<'a> {
|
||||
#[allow(rustc::untranslatable_diagnostic)] // FIXME: make this translatable
|
||||
fn visit_item(&mut self, item: &'ast ast::Item) {
|
||||
match &item.kind {
|
||||
ItemKind::Mod(_, mod_kind)
|
||||
|
@ -892,7 +892,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
|
|||
self.sess,
|
||||
sym::proc_macro_hygiene,
|
||||
item.span,
|
||||
"non-inline modules in proc macro input are unstable",
|
||||
fluent_generated::expand_non_inline_modules_in_proc_macro_input_are_unstable,
|
||||
)
|
||||
.emit();
|
||||
}
|
||||
|
@ -1876,7 +1876,6 @@ impl<'a, 'b> InvocationCollector<'a, 'b> {
|
|||
|
||||
// Detect use of feature-gated or invalid attributes on macro invocations
|
||||
// since they will not be detected after macro expansion.
|
||||
#[allow(rustc::untranslatable_diagnostic)] // FIXME: make this translatable
|
||||
fn check_attributes(&self, attrs: &[ast::Attribute], call: &ast::MacCall) {
|
||||
let features = self.cx.ecfg.features;
|
||||
let mut attrs = attrs.iter().peekable();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue