mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +00:00
13 lines
257 B
Rust
13 lines
257 B
Rust
//@ run-pass
|
|
//@ compile-flags: -Zunleash-the-miri-inside-of-you
|
|
#![allow(unused)]
|
|
|
|
fn double(x: usize) -> usize { x * 2 }
|
|
const X: fn(usize) -> usize = double;
|
|
|
|
const fn bar(x: usize) -> usize {
|
|
X(x) // FIXME: this should error someday
|
|
}
|
|
|
|
fn main() {}
|