Skip to content

Commit 3752c6b

Browse files
committed
remove const_fn feature gate from const tests
1 parent 9a85277 commit 3752c6b

File tree

51 files changed

+69
-105
lines changed

Some content is hidden

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

51 files changed

+69
-105
lines changed

src/test/ui/array-slice-vec/subslice-patterns-const-eval-match.rs

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

33
// run-pass
44

5-
#![feature(const_fn)]
6-
75
#[derive(PartialEq, Debug, Clone)]
86
struct N(u8);
97

src/test/ui/associated-consts/associated-const-in-trait.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// #29924
22

3-
#![feature(const_fn, associated_consts)]
3+
#![feature(associated_consts)]
44

55
trait Trait {
66
const N: usize;

src/test/ui/consts/const-eval/auxiliary/stability.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#![crate_type="rlib"]
44
#![stable(feature = "rust1", since = "1.0.0")]
55

6-
#![feature(const_fn)]
76
#![feature(staged_api)]
87

98
#[stable(feature = "rust1", since = "1.0.0")]

src/test/ui/consts/const-eval/const_fn_ptr.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// run-pass
22
// compile-flags: -Zunleash-the-miri-inside-of-you
3-
#![feature(const_fn)]
43

54
fn double(x: usize) -> usize { x * 2 }
65
const fn double_const(x: usize) -> usize { x * 2 }

src/test/ui/consts/const-eval/const_fn_ptr.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
warning: skipping const checks
22
|
33
help: skipping check that does not even have a feature gate
4-
--> $DIR/const_fn_ptr.rs:12:5
4+
--> $DIR/const_fn_ptr.rs:11:5
55
|
66
LL | X(x)
77
| ^^^^
88
help: skipping check that does not even have a feature gate
9-
--> $DIR/const_fn_ptr.rs:16:5
9+
--> $DIR/const_fn_ptr.rs:15:5
1010
|
1111
LL | X_CONST(x)
1212
| ^^^^^^^^^^
1313
help: skipping check for `const_fn_fn_ptr_basics` feature
14-
--> $DIR/const_fn_ptr.rs:19:14
14+
--> $DIR/const_fn_ptr.rs:18:14
1515
|
1616
LL | const fn foo(x: fn(usize) -> usize, y: usize) -> usize {
1717
| ^
1818
help: skipping check for `const_fn_fn_ptr_basics` feature
19-
--> $DIR/const_fn_ptr.rs:20:5
19+
--> $DIR/const_fn_ptr.rs:19:5
2020
|
2121
LL | x(y)
2222
| ^
2323
help: skipping check that does not even have a feature gate
24-
--> $DIR/const_fn_ptr.rs:20:5
24+
--> $DIR/const_fn_ptr.rs:19:5
2525
|
2626
LL | x(y)
2727
| ^^^^

src/test/ui/consts/const-eval/const_fn_ptr_fail.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// run-pass
22
// compile-flags: -Zunleash-the-miri-inside-of-you
3-
#![feature(const_fn)]
43
#![allow(unused)]
54

65
fn double(x: usize) -> usize { x * 2 }

src/test/ui/consts/const-eval/const_fn_ptr_fail.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
warning: skipping const checks
22
|
33
help: skipping check that does not even have a feature gate
4-
--> $DIR/const_fn_ptr_fail.rs:10:5
4+
--> $DIR/const_fn_ptr_fail.rs:9:5
55
|
66
LL | X(x) // FIXME: this should error someday
77
| ^^^^

src/test/ui/consts/const-eval/const_fn_ptr_fail2.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// build-fail
22
// compile-flags: -Zunleash-the-miri-inside-of-you
33

4-
#![feature(const_fn)]
54
#![allow(const_err)]
65

76
fn double(x: usize) -> usize {

src/test/ui/consts/const-eval/const_fn_ptr_fail2.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
error[E0080]: evaluation of constant value failed
2-
--> $DIR/const_fn_ptr_fail2.rs:20:16
2+
--> $DIR/const_fn_ptr_fail2.rs:19:16
33
|
44
LL | assert_eq!(Y, 4);
55
| ^ referenced constant has errors
66

77
error[E0080]: evaluation of constant value failed
8-
--> $DIR/const_fn_ptr_fail2.rs:22:16
8+
--> $DIR/const_fn_ptr_fail2.rs:21:16
99
|
1010
LL | assert_eq!(Z, 4);
1111
| ^ referenced constant has errors
1212

1313
warning: skipping const checks
1414
|
1515
help: skipping check for `const_fn_fn_ptr_basics` feature
16-
--> $DIR/const_fn_ptr_fail2.rs:12:14
16+
--> $DIR/const_fn_ptr_fail2.rs:11:14
1717
|
1818
LL | const fn bar(x: fn(usize) -> usize, y: usize) -> usize {
1919
| ^
2020
help: skipping check for `const_fn_fn_ptr_basics` feature
21-
--> $DIR/const_fn_ptr_fail2.rs:13:5
21+
--> $DIR/const_fn_ptr_fail2.rs:12:5
2222
|
2323
LL | x(y)
2424
| ^
2525
help: skipping check that does not even have a feature gate
26-
--> $DIR/const_fn_ptr_fail2.rs:13:5
26+
--> $DIR/const_fn_ptr_fail2.rs:12:5
2727
|
2828
LL | x(y)
2929
| ^^^^

src/test/ui/consts/const-eval/dont_promote_unstable_const_fn.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
we're apparently really bad at it",
44
issue = "none")]
55

6-
#![feature(const_fn)]
76
#![feature(staged_api)]
87

98
#[stable(feature = "rust1", since = "1.0.0")]

0 commit comments

Comments
 (0)