Move all intrinsic whitelists into the constness check file

This commit is contained in:
Oliver Scherer 2019-11-26 12:55:11 +01:00
parent 52be0b07ae
commit 46c00a21e1
4 changed files with 42 additions and 56 deletions

View file

@ -7,7 +7,7 @@ extern "C" {
const extern fn bar() {
unsafe {
regular_in_block();
//~^ ERROR: cannot call functions with `"C"` abi in `min_const_fn`
//~^ ERROR: can only call other `const fn` within a `const fn`
}
}
@ -16,7 +16,7 @@ extern fn regular() {}
const extern fn foo() {
unsafe {
regular();
//~^ ERROR: cannot call functions with `"C"` abi in `min_const_fn`
//~^ ERROR: can only call other `const fn` within a `const fn`
}
}

View file

@ -1,4 +1,4 @@
error[E0723]: cannot call functions with `"C"` abi in `min_const_fn`
error[E0723]: can only call other `const fn` within a `const fn`, but `const regular_in_block` is not stable as `const fn`
--> $DIR/const-extern-fn-call-extern-fn.rs:9:9
|
LL | regular_in_block();
@ -7,7 +7,7 @@ LL | regular_in_block();
= note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
= help: add `#![feature(const_fn)]` to the crate attributes to enable
error[E0723]: cannot call functions with `"C"` abi in `min_const_fn`
error[E0723]: can only call other `const fn` within a `const fn`, but `const regular` is not stable as `const fn`
--> $DIR/const-extern-fn-call-extern-fn.rs:18:9
|
LL | regular();