rust/tests/ui/const-generics/condition-in-trait-const-arg.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
342 B
Rust
Raw Normal View History

// Checks that `impl Trait<{anon_const}> for Type` evaluates successfully.
// run-pass
// revisions: full min
#![cfg_attr(full, feature(generic_const_exprs))]
#![cfg_attr(full, allow(incomplete_features))]
trait IsZeroTrait<const IS_ZERO: bool>{}
impl IsZeroTrait<{0u8 == 0u8}> for () {}
impl IsZeroTrait<true> for ((),) {}
fn main() {}