mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 10:13:54 +00:00
12 lines
243 B
Rust
12 lines
243 B
Rust
// check-pass
|
|
|
|
fn main() {}
|
|
|
|
const fn unsize(x: &[u8; 3]) -> &[u8] { x }
|
|
const fn closure() -> fn() { || {} }
|
|
const fn closure2() {
|
|
(|| {}) as fn();
|
|
}
|
|
const fn reify(f: fn()) -> unsafe fn() { f }
|
|
const fn reify2() { main as unsafe fn(); }
|