Skip to content

Commit d125e90

Browse files
committed
Restrict most uses of const_fn to min_const_fn
1 parent 7b3d930 commit d125e90

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+43
-42
lines changed

src/liballoc/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@
8888
#![feature(box_syntax)]
8989
#![feature(cfg_target_has_atomic)]
9090
#![feature(coerce_unsized)]
91-
#![feature(const_fn)]
91+
#![cfg_attr(stage0, feature(const_fn))]
92+
#![cfg_attr(not(stage0), feature(min_const_fn))]
9293
#![feature(core_intrinsics)]
9394
#![feature(custom_attribute)]
9495
#![feature(dropck_eyepatch)]

src/liballoc/tests/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
#![feature(allocator_api)]
1212
#![feature(alloc_system)]
1313
#![feature(box_syntax)]
14-
#![feature(const_fn)]
14+
#![cfg_attr(stage0, feature(const_fn))]
15+
#![cfg_attr(not(stage0), feature(min_const_fn))]
1516
#![feature(drain_filter)]
1617
#![feature(exact_size_is_empty)]
1718
#![feature(pattern)]

src/librustc/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242

4343
#![feature(box_patterns)]
4444
#![feature(box_syntax)]
45-
#![feature(const_fn)]
45+
#![cfg_attr(stage0, feature(const_fn))]
46+
#![cfg_attr(not(stage0), feature(min_const_fn))]
4647
#![feature(core_intrinsics)]
4748
#![feature(drain_filter)]
4849
#![cfg_attr(windows, feature(libc))]

src/librustc_mir/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ Rust MIR: a lowered representation of Rust. Also: an experiment!
2323
#![feature(box_patterns)]
2424
#![feature(box_syntax)]
2525
#![feature(crate_visibility_modifier)]
26-
#![feature(const_fn)]
2726
#![feature(core_intrinsics)]
2827
#![feature(decl_macro)]
2928
#![cfg_attr(stage0, feature(macro_vis_matcher))]

src/librustc_target/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
html_root_url = "https://doc.rust-lang.org/nightly/")]
2323

2424
#![feature(box_syntax)]
25-
#![feature(const_fn)]
25+
#![cfg_attr(stage0, feature(const_fn))]
26+
#![cfg_attr(not(stage0), feature(min_const_fn))]
2627
#![cfg_attr(not(stage0), feature(nll))]
2728
#![cfg_attr(not(stage0), feature(infer_outlives_requirements))]
2829
#![feature(slice_patterns)]

src/test/codegen-units/item-collection/unreferenced-const-fn.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
// NB: We do not expect *any* monomorphization to be generated here.
1515

16-
#![feature(const_fn)]
16+
#![feature(min_const_fn)]
1717
#![deny(dead_code)]
1818
#![crate_type = "rlib"]
1919

src/test/codegen/link-dead-code.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// compile-flags:-Clink-dead-code
1212

13-
#![feature(const_fn)]
13+
#![feature(min_const_fn)]
1414
#![crate_type = "rlib"]
1515

1616
// This test makes sure that, when -Clink-dead-code is specified, we generate

src/test/compile-fail/issue-43733-2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(const_fn)]
11+
#![feature(min_const_fn)]
1212
#![feature(cfg_target_thread_local, thread_local_internals)]
1313

1414
// On platforms *without* `#[thread_local]`, use

src/test/mir-opt/lower_128bit_debug_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
// compile-flags: -Z lower_128bit_ops=yes -C debug_assertions=yes
1717

18-
#![feature(const_fn)]
18+
#![feature(min_const_fn)]
1919

2020
static TEST_SIGNED: i128 = const_signed(-222);
2121
static TEST_UNSIGNED: u128 = const_unsigned(200);

src/test/mir-opt/lower_128bit_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
// compile-flags: -Z lower_128bit_ops=yes -C debug_assertions=no -O
1414

15-
#![feature(const_fn)]
15+
#![feature(min_const_fn)]
1616

1717
static TEST_SIGNED: i128 = const_signed(-222);
1818
static TEST_UNSIGNED: u128 = const_unsigned(200);

0 commit comments

Comments
 (0)