diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2024-08-12 17:09:17 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-12 17:09:17 +0200 |
| commit | ea74eff55ca04effe8332aba80bfa529fce7b973 (patch) | |
| tree | 425e231c9b2c082bfa7a8af45ae197a4802957e9 /compiler/rustc_attr | |
| parent | 355a23292a1cd41d08322a42d593b45ee1438ac0 (diff) | |
| parent | f09a2b047d9a62610f8c1731c75255d7fbb5b2f3 (diff) | |
| download | rust-ea74eff55ca04effe8332aba80bfa529fce7b973.tar.gz rust-ea74eff55ca04effe8332aba80bfa529fce7b973.zip | |
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
Diffstat (limited to 'compiler/rustc_attr')
| -rw-r--r-- | compiler/rustc_attr/messages.ftl | 3 | ||||
| -rw-r--r-- | compiler/rustc_attr/src/builtin.rs | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/compiler/rustc_attr/messages.ftl b/compiler/rustc_attr/messages.ftl index eb51e568f81..5d9ac23ec49 100644 --- a/compiler/rustc_attr/messages.ftl +++ b/compiler/rustc_attr/messages.ftl @@ -104,6 +104,9 @@ attr_unknown_meta_item = attr_unknown_version_literal = unknown version literal format, assuming it refers to a future version +attr_unstable_cfg_target_compact = + compact `cfg(target(..))` is experimental and subject to change + attr_unsupported_literal_cfg_string = literal in `cfg` predicate value must be a string attr_unsupported_literal_deprecated_kv_pair = diff --git a/compiler/rustc_attr/src/builtin.rs b/compiler/rustc_attr/src/builtin.rs index cf86a6942da..d057dcfdf9d 100644 --- a/compiler/rustc_attr/src/builtin.rs +++ b/compiler/rustc_attr/src/builtin.rs @@ -20,6 +20,7 @@ use rustc_span::hygiene::Transparency; use rustc_span::symbol::{sym, Symbol}; use rustc_span::Span; +use crate::fluent_generated; use crate::session_diagnostics::{self, IncorrectReprFormatGenericCause}; /// The version placeholder that recently stabilized features contain inside the @@ -521,7 +522,6 @@ pub struct Condition { } /// Tests if a cfg-pattern matches the cfg set -#[allow(rustc::untranslatable_diagnostic)] // FIXME: make this translatable pub fn cfg_matches( cfg: &ast::MetaItem, sess: &Session, @@ -593,7 +593,6 @@ pub fn parse_version(s: Symbol) -> Option<RustcVersion> { /// Evaluate a cfg-like condition (with `any` and `all`), using `eval` to /// evaluate individual items. -#[allow(rustc::untranslatable_diagnostic)] // FIXME: make this translatable pub fn eval_condition( cfg: &ast::MetaItem, sess: &Session, @@ -680,7 +679,7 @@ pub fn eval_condition( sess, sym::cfg_target_compact, cfg.span, - "compact `cfg(target(..))` is experimental and subject to change", + fluent_generated::attr_unstable_cfg_target_compact, ) .emit(); } |
