// run-pass // Test that we use the elaborated predicates from traits // to satisfy const evaluatable predicates. #![feature(generic_const_exprs)] #![allow(incomplete_features)] use std::mem::size_of; trait Foo: Sized where [(); size_of::()]: Sized, { } impl Foo for u64 {} impl Foo for u32 {} fn foo() -> [u8; size_of::()] { [0; size_of::()] } fn main() { assert_eq!(foo::(), [0; 4]); assert_eq!(foo::(), [0; 8]); }