Bless tests
This commit is contained in:
parent
e2622b915a
commit
54d3329c95
@ -10,11 +10,23 @@ help: skipping check that does not even have a feature gate
|
||||
|
|
||||
LL | X_CONST(x)
|
||||
| ^^^^^^^^^^
|
||||
help: skipping check for `const_fn_fn_ptr_basics` feature
|
||||
--> $DIR/const_fn_ptr.rs:19:14
|
||||
|
|
||||
LL | const fn foo(x: fn(usize) -> usize, y: usize) -> usize {
|
||||
| ^
|
||||
help: skipping check for `const_fn_fn_ptr_basics` feature
|
||||
--> $DIR/const_fn_ptr.rs:20:5
|
||||
|
|
||||
LL | x(y)
|
||||
| ^
|
||||
help: skipping check that does not even have a feature gate
|
||||
--> $DIR/const_fn_ptr.rs:20:5
|
||||
|
|
||||
LL | x(y)
|
||||
| ^^^^
|
||||
|
||||
warning: 1 warning emitted
|
||||
error: `-Zunleash-the-miri-inside-of-you` may not be used to circumvent feature gates, except when testing error paths in the CTFE engine
|
||||
|
||||
error: aborting due to previous error; 1 warning emitted
|
||||
|
||||
|
@ -20,6 +20,16 @@ LL | assert_eq!(Z, 4);
|
||||
|
||||
warning: skipping const checks
|
||||
|
|
||||
help: skipping check for `const_fn_fn_ptr_basics` feature
|
||||
--> $DIR/const_fn_ptr_fail2.rs:12:14
|
||||
|
|
||||
LL | const fn bar(x: fn(usize) -> usize, y: usize) -> usize {
|
||||
| ^
|
||||
help: skipping check for `const_fn_fn_ptr_basics` feature
|
||||
--> $DIR/const_fn_ptr_fail2.rs:13:5
|
||||
|
|
||||
LL | x(y)
|
||||
| ^
|
||||
help: skipping check that does not even have a feature gate
|
||||
--> $DIR/const_fn_ptr_fail2.rs:13:5
|
||||
|
|
||||
|
@ -1,11 +1,11 @@
|
||||
error[E0723]: function pointers in const fn are unstable
|
||||
error[E0658]: function pointers cannot appear in constant functions
|
||||
--> $DIR/const-extern-fn-min-const-fn.rs:4:41
|
||||
|
|
||||
LL | const unsafe extern "C" fn closure() -> fn() { || {} }
|
||||
| ^^^^
|
||||
|
|
||||
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
|
||||
= help: add `#![feature(const_fn)]` to the crate attributes to enable
|
||||
= help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
|
||||
|
||||
error[E0658]: floating point arithmetic is not allowed in constant functions
|
||||
--> $DIR/const-extern-fn-min-const-fn.rs:6:38
|
||||
@ -27,5 +27,4 @@ LL | const extern "C" fn ptr_cast(val: *const u8) { val as usize; }
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0658, E0723.
|
||||
For more information about an error, try `rustc --explain E0658`.
|
||||
For more information about this error, try `rustc --explain E0658`.
|
||||
|
@ -5,7 +5,7 @@ LL | const fn foo() { (||{})() }
|
||||
| ^^^^^^^^
|
||||
|
||||
error: function pointers are not allowed in const fn
|
||||
--> $DIR/issue-56164.rs:8:5
|
||||
--> $DIR/issue-56164.rs:7:5
|
||||
|
|
||||
LL | input()
|
||||
| ^^^^^^^
|
||||
|
@ -1,12 +1,14 @@
|
||||
error[E0723]: function pointers in const fn are unstable
|
||||
--> $DIR/allow_const_fn_ptr.rs:5:16
|
||||
error: const-stable function cannot use `#[feature(const_fn_fn_ptr_basics)]`
|
||||
--> $DIR/allow_const_fn_ptr.rs:6:16
|
||||
|
|
||||
LL | const fn error(_: fn()) {}
|
||||
| ^
|
||||
|
|
||||
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
|
||||
= help: add `#![feature(const_fn)]` to the crate attributes to enable
|
||||
= note: otherwise `#[allow_internal_unstable]` can be used to bypass stability checks
|
||||
help: if it is not part of the public API, make this function unstably const
|
||||
|
|
||||
LL | #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
|
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0723`.
|
||||
|
@ -1,11 +1,33 @@
|
||||
error[E0658]: internal implementation detail
|
||||
--> $DIR/allow_const_fn_ptr_feature_gate.rs:7:1
|
||||
error: stable const functions must have either `rustc_const_stable` or `rustc_const_unstable` attribute
|
||||
--> $DIR/allow_const_fn_ptr_feature_gate.rs:4:1
|
||||
|
|
||||
LL | #[rustc_allow_const_fn_ptr]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
|
||||
LL | const fn error(_: fn()) {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
error: stable const functions must have either `rustc_const_stable` or `rustc_const_unstable` attribute
|
||||
--> $DIR/allow_const_fn_ptr_feature_gate.rs:4:1
|
||||
|
|
||||
LL | const fn error(_: fn()) {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0658]: function pointers cannot appear in constant functions
|
||||
--> $DIR/allow_const_fn_ptr_feature_gate.rs:4:16
|
||||
|
|
||||
LL | const fn error(_: fn()) {}
|
||||
| ^
|
||||
|
|
||||
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
|
||||
= help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
|
||||
|
||||
error[E0658]: function pointers cannot appear in constant functions
|
||||
--> $DIR/allow_const_fn_ptr_feature_gate.rs:11:19
|
||||
|
|
||||
LL | const fn compiles(_: fn()) {}
|
||||
| ^
|
||||
|
|
||||
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
|
||||
= help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0658`.
|
||||
|
@ -1,39 +1,39 @@
|
||||
error[E0723]: function pointers in const fn are unstable
|
||||
error[E0658]: function pointers cannot appear in constant functions
|
||||
--> $DIR/cast_errors.rs:4:23
|
||||
|
|
||||
LL | const fn closure() -> fn() { || {} }
|
||||
| ^^^^
|
||||
|
|
||||
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
|
||||
= help: add `#![feature(const_fn)]` to the crate attributes to enable
|
||||
= help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
|
||||
|
||||
error[E0723]: function pointers in const fn are unstable
|
||||
error[E0658]: function pointers cannot appear in constant functions
|
||||
--> $DIR/cast_errors.rs:7:5
|
||||
|
|
||||
LL | (|| {}) as fn();
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
|
||||
= help: add `#![feature(const_fn)]` to the crate attributes to enable
|
||||
= help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
|
||||
|
||||
error[E0723]: function pointers in const fn are unstable
|
||||
error[E0658]: function pointers cannot appear in constant functions
|
||||
--> $DIR/cast_errors.rs:10:28
|
||||
|
|
||||
LL | const fn reify(f: fn()) -> unsafe fn() { f }
|
||||
| ^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
|
||||
= help: add `#![feature(const_fn)]` to the crate attributes to enable
|
||||
= help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
|
||||
|
||||
error[E0723]: function pointers in const fn are unstable
|
||||
error[E0658]: function pointers cannot appear in constant functions
|
||||
--> $DIR/cast_errors.rs:12:21
|
||||
|
|
||||
LL | const fn reify2() { main as unsafe fn(); }
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
|
||||
= help: add `#![feature(const_fn)]` to the crate attributes to enable
|
||||
= help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0723`.
|
||||
For more information about this error, try `rustc --explain E0658`.
|
||||
|
@ -1,12 +1,12 @@
|
||||
error[E0723]: function pointers in const fn are unstable
|
||||
error[E0658]: function pointers cannot appear in constant functions
|
||||
--> $DIR/cmp_fn_pointers.rs:1:14
|
||||
|
|
||||
LL | const fn cmp(x: fn(), y: fn()) -> bool {
|
||||
| ^
|
||||
|
|
||||
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
|
||||
= help: add `#![feature(const_fn)]` to the crate attributes to enable
|
||||
= help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0723`.
|
||||
For more information about this error, try `rustc --explain E0658`.
|
||||
|
@ -209,23 +209,23 @@ LL | const fn really_no_traits_i_mean_it() { (&() as &dyn std::fmt::Debug, ()).1
|
||||
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
|
||||
= help: add `#![feature(const_fn)]` to the crate attributes to enable
|
||||
|
||||
error[E0723]: function pointers in const fn are unstable
|
||||
error[E0658]: function pointers cannot appear in constant functions
|
||||
--> $DIR/min_const_fn.rs:130:21
|
||||
|
|
||||
LL | const fn no_fn_ptrs(_x: fn()) {}
|
||||
| ^^
|
||||
|
|
||||
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
|
||||
= help: add `#![feature(const_fn)]` to the crate attributes to enable
|
||||
= help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
|
||||
|
||||
error[E0723]: function pointers in const fn are unstable
|
||||
error[E0658]: function pointers cannot appear in constant functions
|
||||
--> $DIR/min_const_fn.rs:132:27
|
||||
|
|
||||
LL | const fn no_fn_ptrs2() -> fn() { fn foo() {} foo }
|
||||
| ^^^^
|
||||
|
|
||||
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
|
||||
= help: add `#![feature(const_fn)]` to the crate attributes to enable
|
||||
= help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
|
||||
|
||||
error: aborting due to 26 previous errors
|
||||
|
||||
|
@ -1,21 +1,21 @@
|
||||
error[E0723]: function pointers in const fn are unstable
|
||||
error[E0658]: function pointers cannot appear in constant functions
|
||||
--> $DIR/min_const_fn_fn_ptr.rs:11:5
|
||||
|
|
||||
LL | x.0.field;
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
|
||||
= help: add `#![feature(const_fn)]` to the crate attributes to enable
|
||||
= help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
|
||||
|
||||
error[E0723]: function pointers in const fn are unstable
|
||||
error[E0658]: function pointers cannot appear in constant functions
|
||||
--> $DIR/min_const_fn_fn_ptr.rs:14:59
|
||||
|
|
||||
LL | const fn no_inner_dyn_trait_ret() -> Hide { Hide(HasPtr { field }) }
|
||||
| ^^^^^
|
||||
|
|
||||
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
|
||||
= help: add `#![feature(const_fn)]` to the crate attributes to enable
|
||||
= help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0723`.
|
||||
For more information about this error, try `rustc --explain E0658`.
|
||||
|
@ -12,12 +12,12 @@ LL | static VAL: () = call_rust_fn(unsafe { std::mem::transmute(c_fn as extern "
|
||||
|
||||
warning: skipping const checks
|
||||
|
|
||||
help: skipping check for `const_fn` feature
|
||||
help: skipping check for `const_fn_fn_ptr_basics` feature
|
||||
--> $DIR/abi-mismatch.rs:9:23
|
||||
|
|
||||
LL | const fn call_rust_fn(my_fn: extern "Rust" fn()) {
|
||||
| ^^^^^
|
||||
help: skipping check for `const_fn` feature
|
||||
help: skipping check for `const_fn_fn_ptr_basics` feature
|
||||
--> $DIR/abi-mismatch.rs:10:5
|
||||
|
|
||||
LL | my_fn();
|
||||
|
@ -1,12 +1,12 @@
|
||||
error[E0723]: function pointers in const fn are unstable
|
||||
error[E0658]: function pointers cannot appear in constant functions
|
||||
--> $DIR/issue-37550.rs:3:9
|
||||
|
|
||||
LL | let x = || t;
|
||||
| ^
|
||||
|
|
||||
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
|
||||
= help: add `#![feature(const_fn)]` to the crate attributes to enable
|
||||
= help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0723`.
|
||||
For more information about this error, try `rustc --explain E0658`.
|
||||
|
@ -1,10 +1,27 @@
|
||||
warning: skipping const checks
|
||||
|
|
||||
help: skipping check for `const_fn_fn_ptr_basics` feature
|
||||
--> $DIR/caller-location-fnptr-rt-ctfe-equiv.rs:20:9
|
||||
|
|
||||
LL | let ptr: fn() -> L = attributed;
|
||||
| ^^^
|
||||
help: skipping check for `const_fn_fn_ptr_basics` feature
|
||||
--> $DIR/caller-location-fnptr-rt-ctfe-equiv.rs:21:5
|
||||
|
|
||||
LL | ptr()
|
||||
| ^^^
|
||||
help: skipping check for `const_fn_fn_ptr_basics` feature
|
||||
--> $DIR/caller-location-fnptr-rt-ctfe-equiv.rs:20:26
|
||||
|
|
||||
LL | let ptr: fn() -> L = attributed;
|
||||
| ^^^^^^^^^^
|
||||
help: skipping check that does not even have a feature gate
|
||||
--> $DIR/caller-location-fnptr-rt-ctfe-equiv.rs:21:5
|
||||
|
|
||||
LL | ptr()
|
||||
| ^^^^^
|
||||
|
||||
warning: 1 warning emitted
|
||||
error: `-Zunleash-the-miri-inside-of-you` may not be used to circumvent feature gates, except when testing error paths in the CTFE engine
|
||||
|
||||
error: aborting due to previous error; 1 warning emitted
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user