Stabilize min_const_fn
This commit is contained in:
parent
b8bea5a0a6
commit
ec74d3533a
68 changed files with 143 additions and 223 deletions
|
|
@ -11,6 +11,5 @@
|
|||
// Crate that exports a const fn. Used for testing cross-crate.
|
||||
|
||||
#![crate_type="rlib"]
|
||||
#![feature(min_const_fn)]
|
||||
|
||||
pub const fn foo() -> usize { 22 }
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
// run-pass
|
||||
#![allow(dead_code)]
|
||||
#![feature(min_const_fn)]
|
||||
|
||||
const fn add(x: usize, y: usize) -> usize {
|
||||
x + y
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
#![feature(min_const_fn)]
|
||||
|
||||
struct Foo { value: u32 }
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@
|
|||
// run-pass
|
||||
// Test a call whose argument is the result of another call.
|
||||
|
||||
#![feature(min_const_fn)]
|
||||
|
||||
const fn sub(x: u32, y: u32) -> u32 {
|
||||
x - y
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
// run-pass
|
||||
|
||||
#![feature(min_const_fn)]
|
||||
|
||||
struct A;
|
||||
|
||||
impl A {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
// run-pass
|
||||
#![allow(unreachable_patterns)]
|
||||
#![feature(min_const_fn)]
|
||||
|
||||
#[derive(PartialEq, Eq)]
|
||||
enum Cake {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
// run-pass
|
||||
#![allow(dead_code)]
|
||||
#![feature(min_const_fn)]
|
||||
|
||||
use std::mem;
|
||||
|
||||
|
|
|
|||
|
|
@ -12,8 +12,6 @@
|
|||
#![allow(dead_code)]
|
||||
// A quick test of 'unsafe const fn' functionality
|
||||
|
||||
#![feature(min_const_fn)]
|
||||
|
||||
const unsafe fn dummy(v: u32) -> u32 {
|
||||
!v
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
#![feature(min_const_fn)]
|
||||
|
||||
const FOO: isize = 10;
|
||||
const BAR: isize = 3;
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@
|
|||
|
||||
// https://github.com/rust-lang/rust/issues/48279
|
||||
|
||||
#![feature(min_const_fn)]
|
||||
|
||||
#[derive(PartialEq, Eq)]
|
||||
pub struct NonZeroU32 {
|
||||
value: u32
|
||||
|
|
|
|||
|
|
@ -13,8 +13,6 @@
|
|||
|
||||
// https://github.com/rust-lang/rust/issues/46114
|
||||
|
||||
#![feature(min_const_fn)]
|
||||
|
||||
#[derive(Eq, PartialEq)]
|
||||
struct A { value: u32 }
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
|
||||
// https://github.com/rust-lang/rust/issues/43754
|
||||
|
||||
#![feature(min_const_fn)]
|
||||
const fn foo(x: usize) -> usize {
|
||||
return x;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![feature(min_const_fn)]
|
||||
#![crate_type = "lib"]
|
||||
|
||||
const fn foo(i: i32) -> i32 {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
// run-pass
|
||||
#![allow(dead_code)]
|
||||
#![feature(min_const_fn)]
|
||||
struct A {
|
||||
field: usize,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
#![feature(min_const_fn)]
|
||||
|
||||
const fn foo() -> *const i8 {
|
||||
b"foo" as *const _ as *const i8
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
// except according to those terms.
|
||||
|
||||
// run-pass
|
||||
#![feature(min_const_fn)]
|
||||
|
||||
const fn foo() -> i64 {
|
||||
3
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
// run-pass
|
||||
#![allow(dead_code)]
|
||||
#![feature(min_const_fn)]
|
||||
const fn f() -> usize {
|
||||
5
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue