Skip to content

Commit 8660621

Browse files
Remove const_if_match feature gate from libraries
1 parent 0438e25 commit 8660621

File tree

13 files changed

+15
-15
lines changed

13 files changed

+15
-15
lines changed

src/liballoc/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
#![feature(const_generic_impls_guard)]
8888
#![feature(const_generics)]
8989
#![feature(const_in_array_repeat_expressions)]
90-
#![feature(const_if_match)]
90+
#![cfg_attr(bootstrap, feature(const_if_match))]
9191
#![feature(cow_is_borrowed)]
9292
#![feature(dispatch_from_dyn)]
9393
#![feature(core_intrinsics)]

src/libcore/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
#![feature(const_ascii_ctype_on_intrinsics)]
7474
#![feature(const_alloc_layout)]
7575
#![feature(const_discriminant)]
76-
#![feature(const_if_match)]
76+
#![cfg_attr(bootstrap, feature(const_if_match))]
7777
#![feature(const_loop)]
7878
#![feature(const_checked_int_methods)]
7979
#![feature(const_euclidean_int_methods)]

src/libcore/num/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1578,7 +1578,7 @@ $EndFeature, "
15781578
#[stable(feature = "no_panic_abs", since = "1.13.0")]
15791579
#[rustc_const_stable(feature = "const_int_methods", since = "1.32.0")]
15801580
#[allow(unused_attributes)]
1581-
#[allow_internal_unstable(const_if_match)]
1581+
#[cfg_attr(bootstrap, allow_internal_unstable(const_if_match))]
15821582
#[inline]
15831583
pub const fn wrapping_abs(self) -> Self {
15841584
if self.is_negative() {
@@ -1867,7 +1867,7 @@ assert_eq!(", stringify!($SelfT), "::MIN.overflowing_neg(), (", stringify!($Self
18671867
#[stable(feature = "wrapping", since = "1.7.0")]
18681868
#[rustc_const_stable(feature = "const_int_methods", since = "1.32.0")]
18691869
#[allow(unused_attributes)]
1870-
#[allow_internal_unstable(const_if_match)]
1870+
#[cfg_attr(bootstrap, allow_internal_unstable(const_if_match))]
18711871
pub const fn overflowing_neg(self) -> (Self, bool) {
18721872
if self == Self::MIN {
18731873
(Self::MIN, true)
@@ -2160,7 +2160,7 @@ $EndFeature, "
21602160
#[stable(feature = "rust1", since = "1.0.0")]
21612161
#[rustc_const_stable(feature = "const_int_methods", since = "1.32.0")]
21622162
#[allow(unused_attributes)]
2163-
#[allow_internal_unstable(const_if_match)]
2163+
#[cfg_attr(bootstrap, allow_internal_unstable(const_if_match))]
21642164
#[inline]
21652165
#[rustc_inherit_overflow_checks]
21662166
pub const fn abs(self) -> Self {

src/librustc_ast/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/", test(attr(deny(warnings))))]
88
#![feature(bool_to_option)]
99
#![feature(box_syntax)]
10-
#![feature(const_if_match)]
10+
#![cfg_attr(bootstrap, feature(const_if_match))]
1111
#![feature(const_fn)] // For the `transmute` in `P::new`
1212
#![feature(const_panic)]
1313
#![feature(const_transmute)]

src/librustc_hir/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//! [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/hir.html
44
55
#![feature(crate_visibility_modifier)]
6-
#![feature(const_if_match)]
6+
#![cfg_attr(bootstrap, feature(const_if_match))]
77
#![feature(const_fn)] // For the unsizing cast on `&[]`
88
#![feature(const_panic)]
99
#![feature(in_band_lifetimes)]

src/librustc_index/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![feature(allow_internal_unstable)]
2-
#![feature(const_if_match)]
2+
#![cfg_attr(bootstrap, feature(const_if_match))]
33
#![feature(const_fn)]
44
#![feature(const_panic)]
55
#![feature(extend_one)]

src/librustc_infer/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#![feature(box_patterns)]
1818
#![feature(box_syntax)]
1919
#![feature(const_fn)]
20-
#![feature(const_if_match)]
20+
#![cfg_attr(bootstrap, feature(const_if_match))]
2121
#![feature(const_panic)]
2222
#![feature(extend_one)]
2323
#![feature(never_type)]

src/librustc_middle/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#![feature(bool_to_option)]
2828
#![feature(box_patterns)]
2929
#![feature(box_syntax)]
30-
#![feature(const_if_match)]
30+
#![cfg_attr(bootstrap, feature(const_if_match))]
3131
#![feature(const_fn)]
3232
#![feature(const_panic)]
3333
#![feature(const_transmute)]

src/librustc_mir/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Rust MIR: a lowered representation of Rust.
1010
#![feature(box_patterns)]
1111
#![feature(box_syntax)]
1212
#![feature(const_fn)]
13-
#![feature(const_if_match)]
13+
#![cfg_attr(bootstrap, feature(const_if_match))]
1414
#![feature(const_loop)]
1515
#![feature(const_panic)]
1616
#![feature(crate_visibility_modifier)]

src/librustc_mir_build/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
#![feature(box_patterns)]
66
#![feature(box_syntax)]
7-
#![feature(const_if_match)]
7+
#![cfg_attr(bootstrap, feature(const_if_match))]
88
#![feature(const_fn)]
99
#![feature(const_panic)]
1010
#![feature(crate_visibility_modifier)]

0 commit comments

Comments
 (0)