Skip to content

Commit 1de1d84

Browse files
committed
Remove unstable cfg target(...) compact feature from RFC3239
1 parent 0b16baa commit 1de1d84

13 files changed

+3
-195
lines changed

compiler/rustc_attr/messages.ftl

-3
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,6 @@ attr_unknown_meta_item =
104104
attr_unknown_version_literal =
105105
unknown version literal format, assuming it refers to a future version
106106
107-
attr_unstable_cfg_target_compact =
108-
compact `cfg(target(..))` is experimental and subject to change
109-
110107
attr_unsupported_literal_cfg_boolean =
111108
literal in `cfg` predicate value must be a boolean
112109
attr_unsupported_literal_cfg_string =

compiler/rustc_attr/src/builtin.rs

-28
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ use rustc_span::Span;
2020
use rustc_span::hygiene::Transparency;
2121
use rustc_span::symbol::{Symbol, kw, sym};
2222

23-
use crate::fluent_generated;
2423
use crate::session_diagnostics::{self, IncorrectReprFormatGenericCause};
2524

2625
/// The version placeholder that recently stabilized features contain inside the
@@ -709,33 +708,6 @@ pub fn eval_condition(
709708

710709
!eval_condition(mi, sess, features, eval)
711710
}
712-
sym::target => {
713-
if let Some(features) = features
714-
&& !features.cfg_target_compact
715-
{
716-
feature_err(
717-
sess,
718-
sym::cfg_target_compact,
719-
cfg.span,
720-
fluent_generated::attr_unstable_cfg_target_compact,
721-
)
722-
.emit();
723-
}
724-
725-
mis.iter().fold(true, |res, mi| {
726-
let mut mi = mi.meta_item().unwrap().clone();
727-
if let [seg, ..] = &mut mi.path.segments[..] {
728-
seg.ident.name = Symbol::intern(&format!("target_{}", seg.ident.name));
729-
}
730-
731-
res & eval_condition(
732-
&ast::MetaItemInner::MetaItem(mi),
733-
sess,
734-
features,
735-
eval,
736-
)
737-
})
738-
}
739711
_ => {
740712
dcx.emit_err(session_diagnostics::InvalidPredicate {
741713
span: cfg.span,

compiler/rustc_feature/src/removed.rs

+3
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ declare_features! (
5252
(removed, box_syntax, "1.70.0", Some(49733), Some("replaced with `#[rustc_box]`")),
5353
/// Allows capturing disjoint fields in a closure/coroutine (RFC 2229).
5454
(removed, capture_disjoint_fields, "1.49.0", Some(53488), Some("stabilized in Rust 2021")),
55+
/// Allows `cfg(target(abi = "..."))`.
56+
(removed, cfg_target_compact, "CURRENT_RUSTC_VERSION", Some(96901),
57+
Some("removed due to lack of usefulness and users")),
5558
/// Allows comparing raw pointers during const eval.
5659
(removed, const_compare_raw_pointers, "1.46.0", Some(53020),
5760
Some("cannot be allowed in const eval in any meaningful way")),

compiler/rustc_feature/src/unstable.rs

-2
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,6 @@ declare_features! (
381381
(unstable, cfg_sanitize, "1.41.0", Some(39699)),
382382
/// Allows `cfg(sanitizer_cfi_generalize_pointers)` and `cfg(sanitizer_cfi_normalize_integers)`.
383383
(unstable, cfg_sanitizer_cfi, "1.77.0", Some(89653)),
384-
/// Allows `cfg(target(abi = "..."))`.
385-
(unstable, cfg_target_compact, "1.63.0", Some(96901)),
386384
/// Allows `cfg(target_has_atomic_load_store = "...")`.
387385
(unstable, cfg_target_has_atomic, "1.60.0", Some(94039)),
388386
/// Allows `cfg(target_has_atomic_equal_alignment = "...")`.

tests/ui/cfg/cfg-target-compact-errors.rs

-17
This file was deleted.

tests/ui/cfg/cfg-target-compact-errors.stderr

-22
This file was deleted.

tests/ui/cfg/cfg-target-compact.rs

-10
This file was deleted.

tests/ui/check-cfg/compact-names.rs

-16
This file was deleted.

tests/ui/check-cfg/compact-names.stderr

-13
This file was deleted.

tests/ui/check-cfg/compact-values.rs

-16
This file was deleted.

tests/ui/check-cfg/compact-values.stderr

-12
This file was deleted.

tests/ui/feature-gates/feature-gate-cfg-target-compact.rs

-13
This file was deleted.

tests/ui/feature-gates/feature-gate-cfg-target-compact.stderr

-43
This file was deleted.

0 commit comments

Comments
 (0)