Skip to content

Commit 2c5e784

Browse files
committed
add const_fn features
1 parent 1f29fd4 commit 2c5e784

27 files changed

+38
-1
lines changed

src/libcollectionstest/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#![feature(collections)]
1515
#![feature(collections_drain)]
1616
#![feature(core)]
17+
#![feature(const_fn)]
1718
#![feature(hash)]
1819
#![feature(rand)]
1920
#![feature(rustc_private)]

src/libcoretest/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#![feature(box_syntax)]
1515
#![feature(unboxed_closures)]
1616
#![feature(core)]
17+
#![feature(const_fn)]
1718
#![feature(test)]
1819
#![feature(rand)]
1920
#![feature(unicode)]

src/liblog/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@
173173
#![feature(staged_api)]
174174
#![feature(box_syntax)]
175175
#![feature(core)]
176+
#![feature(const_fn)]
176177
#![feature(std_misc)]
177178

178179
use std::boxed;

src/librustc/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#![feature(box_patterns)]
3030
#![feature(box_syntax)]
3131
#![feature(collections)]
32+
#![feature(const_fn)]
3233
#![feature(core)]
3334
#![feature(duration)]
3435
#![feature(duration_span)]

src/librustc_trans/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#![feature(box_syntax)]
3131
#![feature(collections)]
3232
#![feature(core)]
33+
#![feature(const_fn)]
3334
#![feature(libc)]
3435
#![feature(quote)]
3536
#![feature(rustc_diagnostic_macros)]

src/test/auxiliary/issue-17718.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![feature(const_fn)]
12+
1113
use std::sync::atomic;
1214

1315
pub const C1: usize = 1;

src/test/compile-fail/dropck_arr_cycle_checked.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
//
1414
// (Compare against compile-fail/dropck_vec_cycle_checked.rs)
1515

16+
#![feature(const_fn)]
17+
1618
use std::cell::Cell;
1719
use id::Id;
1820

src/test/compile-fail/dropck_tarena_cycle_checked.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
// for the error message we see here.)
1818

1919
#![allow(unstable)]
20+
#![feature(const_fn)]
2021

2122
extern crate arena;
2223

src/test/compile-fail/dropck_trait_cycle_checked.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
//
1414
// (Compare against compile-fail/dropck_vec_cycle_checked.rs)
1515

16+
#![feature(const_fn)]
17+
1618
use std::cell::Cell;
1719
use id::Id;
1820

src/test/compile-fail/dropck_vec_cycle_checked.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
//
1313
// (Compare against compile-fail/dropck_arr_cycle_checked.rs)
1414

15+
#![feature(const_fn)]
16+
1517
use std::cell::Cell;
1618
use id::Id;
1719

src/test/compile-fail/functional-struct-update-respects-privacy.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
// RFC 736 (and Issue 21407): functional struct update should respect privacy.
1212

13+
#![feature(const_fn)]
14+
1315
// The `foo` module attempts to maintains an invariant that each `S`
1416
// has a unique `u64` id.
1517
use self::foo::S;

src/test/compile-fail/issue-17718-const-borrow.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![feature(const_fn)]
12+
1113
use std::cell::UnsafeCell;
1214

1315
const A: UnsafeCell<usize> = UnsafeCell::new(1);

src/test/compile-fail/issue-7364.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
#![feature(box_syntax)]
12+
#![feature(const_fn)]
1213

1314
use std::cell::RefCell;
1415

src/test/compile-fail/vec-must-not-hide-type-from-dropck.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
// conditions above to be satisfied, meaning that if the dropck is
2424
// sound, it should reject this code.
2525

26+
#![feature(const_fn)]
27+
2628
use std::cell::Cell;
2729
use id::Id;
2830

src/test/debuginfo/constant-debug-locs.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#![allow(dead_code, unused_variables)]
1616
#![omit_gdb_pretty_printer_section]
1717
#![feature(std_misc, core)]
18+
#![feature(const_fn)]
1819

1920
// This test makes sure that the compiler doesn't crash when trying to assign
2021
// debug locations to const-expressions.

src/test/run-pass-valgrind/cast-enum-with-dtor.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
#![allow(dead_code)]
12+
#![feature(const_fn)]
1213

1314
// check dtor calling order when casting enums.
1415

src/test/run-pass/associated-types-project-from-type-param-via-bound-in-where-clause.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// `Item` originates in a where-clause, not the declaration of
1313
// `T`. Issue #20300.
1414

15+
#![feature(const_fn)]
16+
1517
use std::marker::{PhantomData};
1618
use std::sync::atomic::{AtomicUsize};
1719
use std::sync::atomic::Ordering::SeqCst;

src/test/run-pass/box-of-array-of-drop-1.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
// Test that we cleanup a fixed size Box<[D; k]> properly when D has a
1212
// destructor.
1313

14+
#![feature(const_fn)]
15+
1416
use std::thread;
1517
use std::sync::atomic::{AtomicUsize, Ordering};
1618

src/test/run-pass/box-of-array-of-drop-2.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
// Test that we cleanup dynamic sized Box<[D]> properly when D has a
1212
// destructor.
1313

14+
#![feature(const_fn)]
15+
1416
use std::thread;
1517
use std::sync::atomic::{AtomicUsize, Ordering};
1618

src/test/run-pass/const-fn-method.rs

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

1111
#![feature(const_fn)]
1212

13-
struct Foo { val: u32 }
13+
struct Foo { value: u32 }
1414

1515
impl Foo {
1616
const fn new() -> Foo {

src/test/run-pass/issue-17718-static-unsafe-interior.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
// pretty-expanded FIXME #23616
1212

1313
#![feature(core)]
14+
#![feature(const_fn)]
15+
1416

1517
use std::marker;
1618
use std::cell::UnsafeCell;

src/test/run-pass/issue-17718.rs

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

1313

1414
#![feature(core)]
15+
#![feature(const_fn)]
1516

1617
extern crate issue_17718 as other;
1718

src/test/run-pass/issue-21486.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// created via FRU and control-flow breaks in the middle of
1313
// construction.
1414

15+
#![feature(const_fn)]
1516

1617
use std::sync::atomic::{Ordering, AtomicUsize};
1718

src/test/run-pass/nested-vec-3.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// the contents implement Drop and we hit a panic in the middle of
1313
// construction.
1414

15+
#![feature(const_fn)]
1516

1617
use std::thread;
1718
use std::sync::atomic::{AtomicUsize, Ordering};

src/test/run-pass/struct-order-of-eval-3.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// Checks that functional-record-update order-of-eval is as expected
1212
// even when no Drop-implementations are involved.
1313

14+
#![feature(const_fn)]
1415

1516
use std::sync::atomic::{Ordering, AtomicUsize};
1617

src/test/run-pass/struct-order-of-eval-4.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// Checks that struct-literal expression order-of-eval is as expected
1212
// even when no Drop-implementations are involved.
1313

14+
#![feature(const_fn)]
1415

1516
use std::sync::atomic::{Ordering, AtomicUsize};
1617

src/test/run-pass/vector-sort-panic-safe.rs

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

1111

1212
#![feature(rand, core)]
13+
#![feature(const_fn)]
1314

1415
use std::sync::atomic::{AtomicUsize, Ordering};
1516
use std::__rand::{thread_rng, Rng};

0 commit comments

Comments
 (0)