rust/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-trait-assoc-tys.rs
2024-01-12 17:22:18 +01:00

19 lines
390 B
Rust

// check-pass
#![feature(const_trait_impl, effects)]
#[const_trait]
trait Trait {
// FIXME(effects): `~const` bounds in trait associated types (excluding associated type bounds)
// don't look super useful. Should we forbid them again?
type Assoc<T: ~const Bound>;
}
impl const Trait for () {
type Assoc<T: ~const Bound> = T;
}
#[const_trait]
trait Bound {}
fn main() {}