Add unit test for issue 78132

This commit is contained in:
Gary Guo 2021-10-03 16:03:34 +01:00
parent 468192a9c5
commit 4acef9ac19
2 changed files with 24 additions and 0 deletions

View file

@ -0,0 +1,12 @@
// check-pass
#![feature(inline_const)]
#![allow(incomplete_features)]
pub fn todo<T>() -> T {
const { todo!() }
}
fn main() {
let _: usize = const { 0 };
}

View file

@ -0,0 +1,12 @@
// check-pass
#![feature(inline_const)]
#![allow(incomplete_features)]
fn main() {
match 1u64 {
0 => (),
const { 0 + 1 } => (),
const { 2 - 1 } ..= const { u64::MAX } => (),
}
}