Lazy evaluate consts in path_to_const

This commit is contained in:
hkalbasi 2023-05-03 18:54:30 +03:30
parent 0dd94d3b07
commit aafe9b1e06
6 changed files with 76 additions and 17 deletions

View file

@ -353,6 +353,14 @@ fn niche_optimization() {
}
}
#[test]
fn const_eval() {
size_and_align! {
const X: usize = 5;
struct Goal([i32; X]);
}
}
#[test]
fn enums_with_discriminants() {
size_and_align! {