diff options
Diffstat (limited to 'tests/ui/const-generics/issues/issue-88468.rs')
-rw-r--r-- | tests/ui/const-generics/issues/issue-88468.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/const-generics/issues/issue-88468.rs b/tests/ui/const-generics/issues/issue-88468.rs new file mode 100644 index 000000000..914047236 --- /dev/null +++ b/tests/ui/const-generics/issues/issue-88468.rs @@ -0,0 +1,13 @@ +// check-pass + +#![allow(incomplete_features)] +#![feature(generic_const_exprs)] + +pub struct Assert<const COND: bool>(); +pub trait IsTrue {} +impl IsTrue for Assert<true> {} + +pub trait IsNotZST {} +impl<T> IsNotZST for T where Assert<{ std::mem::size_of::<T>() > 0 }>: IsTrue {} + +fn main() {} |