Stabilize min_const_fn

This commit is contained in:
Oliver Schneider 2018-10-05 10:17:16 +02:00
parent b8bea5a0a6
commit ec74d3533a
68 changed files with 143 additions and 223 deletions

View file

@ -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 }

View file

@ -10,7 +10,6 @@
// run-pass
#![allow(dead_code)]
#![feature(min_const_fn)]
const fn add(x: usize, y: usize) -> usize {
x + y

View file

@ -9,7 +9,6 @@
// except according to those terms.
// run-pass
#![feature(min_const_fn)]
struct Foo { value: u32 }

View file

@ -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
}

View file

@ -10,8 +10,6 @@
// run-pass
#![feature(min_const_fn)]
struct A;
impl A {

View file

@ -10,7 +10,6 @@
// run-pass
#![allow(unreachable_patterns)]
#![feature(min_const_fn)]
#[derive(PartialEq, Eq)]
enum Cake {

View file

@ -10,7 +10,6 @@
// run-pass
#![allow(dead_code)]
#![feature(min_const_fn)]
use std::mem;

View file

@ -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
}

View file

@ -9,7 +9,6 @@
// except according to those terms.
// run-pass
#![feature(min_const_fn)]
const FOO: isize = 10;
const BAR: isize = 3;

View file

@ -14,8 +14,6 @@
// https://github.com/rust-lang/rust/issues/48279
#![feature(min_const_fn)]
#[derive(PartialEq, Eq)]
pub struct NonZeroU32 {
value: u32

View file

@ -13,8 +13,6 @@
// https://github.com/rust-lang/rust/issues/46114
#![feature(min_const_fn)]
#[derive(Eq, PartialEq)]
struct A { value: u32 }

View file

@ -12,7 +12,6 @@
// https://github.com/rust-lang/rust/issues/43754
#![feature(min_const_fn)]
const fn foo(x: usize) -> usize {
return x;
}

View file

@ -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 {

View file

@ -10,7 +10,6 @@
// run-pass
#![allow(dead_code)]
#![feature(min_const_fn)]
struct A {
field: usize,
}

View file

@ -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

View file

@ -9,7 +9,6 @@
// except according to those terms.
// run-pass
#![feature(min_const_fn)]
const fn foo() -> i64 {
3

View file

@ -10,7 +10,6 @@
// run-pass
#![allow(dead_code)]
#![feature(min_const_fn)]
const fn f() -> usize {
5
}