Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stabilize #[cfg(panic = "...")] #93658

Merged
merged 7 commits into from
Feb 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions compiler/rustc_feature/src/accepted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ declare_features! (
(accepted, cfg_attr_multi, "1.33.0", Some(54881), None),
/// Allows the use of `#[cfg(doctest)]`, set when rustdoc is collecting doctests.
(accepted, cfg_doctest, "1.40.0", Some(62210), None),
/// Enables `#[cfg(panic = "...")]` config key.
(accepted, cfg_panic, "1.60.0", Some(77443), None),
/// Allows `cfg(target_feature = "...")`.
(accepted, cfg_target_feature, "1.27.0", Some(29717), None),
/// Allows `cfg(target_has_atomic = "...")`.
Expand Down
2 changes: 0 additions & 2 deletions compiler/rustc_feature/src/active.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,6 @@ declare_features! (
(active, c_variadic, "1.34.0", Some(44930), None),
/// Allows capturing disjoint fields in a closure/generator (RFC 2229).
(incomplete, capture_disjoint_fields, "1.49.0", Some(53488), None),
/// Enables `#[cfg(panic = "...")]` config key.
(active, cfg_panic, "1.49.0", Some(77443), None),
/// Allows the use of `#[cfg(sanitize = "option")]`; set when -Zsanitizer is used.
(active, cfg_sanitize, "1.41.0", Some(39699), None),
/// Allows `cfg(target_abi = "...")`.
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_feature/src/builtin_attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ const GATED_CFGS: &[GatedCfg] = &[
),
(sym::sanitize, sym::cfg_sanitize, cfg_fn!(cfg_sanitize)),
(sym::version, sym::cfg_version, cfg_fn!(cfg_version)),
(sym::panic, sym::cfg_panic, cfg_fn!(cfg_panic)),
];

/// Find a gated cfg determined by the `pred`icate which is given the cfg's name.
Expand Down
2 changes: 1 addition & 1 deletion library/core/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#![feature(bool_to_option)]
#![feature(box_syntax)]
#![feature(cell_update)]
#![feature(cfg_panic)]
#![cfg_attr(bootstrap, feature(cfg_panic))]
#![cfg_attr(bootstrap, feature(cfg_target_has_atomic))]
#![feature(const_assume)]
#![feature(const_black_box)]
Expand Down
38 changes: 0 additions & 38 deletions src/doc/unstable-book/src/language-features/cfg-panic.md

This file was deleted.

2 changes: 1 addition & 1 deletion src/test/ui/cfg/cfg-panic-abort.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// build-pass
// compile-flags: -C panic=abort
// no-prefer-dynamic
#![feature(cfg_panic)]


#[cfg(panic = "unwind")]
pub fn bad() -> i32 { }
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/cfg/cfg-panic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// ignore-emscripten no panic_unwind implementation
// ignore-wasm32 no panic_unwind implementation
// ignore-wasm64 no panic_unwind implementation
#![feature(cfg_panic)]


#[cfg(panic = "abort")]
pub fn bad() -> i32 { }
Expand Down
11 changes: 0 additions & 11 deletions src/test/ui/feature-gates/feature-gate-cfg-panic.rs

This file was deleted.

21 changes: 0 additions & 21 deletions src/test/ui/feature-gates/feature-gate-cfg-panic.stderr

This file was deleted.

1 change: 0 additions & 1 deletion src/test/ui/fmt/format-args-capture.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// run-pass
#![feature(cfg_panic)]

fn main() {
named_argument_takes_precedence_to_captured();
Expand Down
1 change: 0 additions & 1 deletion src/test/ui/issues/issue-68696-catch-during-unwind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// entering the catch_unwind.
//
// run-pass
#![feature(cfg_panic)]

use std::panic::catch_unwind;

Expand Down