mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
24 lines
379 B
Rust
24 lines
379 B
Rust
#![allow(incomplete_features)]
|
|
#![feature(inline_const_pat)]
|
|
|
|
const unsafe fn require_unsafe() -> usize {
|
|
1
|
|
}
|
|
|
|
fn main() {
|
|
match () {
|
|
const {
|
|
require_unsafe();
|
|
//~^ ERROR [E0133]
|
|
} => (),
|
|
}
|
|
|
|
match 1 {
|
|
const {
|
|
require_unsafe()
|
|
//~^ ERROR [E0133]
|
|
}..=4 => (),
|
|
_ => (),
|
|
}
|
|
}
|