rust/tests/ui/consts/const-eval/const_fn_ptr_fail.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
255 B
Rust
Raw Normal View History

// run-pass
2019-09-21 16:09:38 +02:00
// compile-flags: -Zunleash-the-miri-inside-of-you
#![allow(unused)]
fn double(x: usize) -> usize { x * 2 }
const X: fn(usize) -> usize = double;
2020-05-03 14:23:08 +02:00
const fn bar(x: usize) -> usize {
2019-09-21 16:09:38 +02:00
X(x) // FIXME: this should error someday
}
fn main() {}