17 lines
298 B
Rust
17 lines
298 B
Rust
|
|
// check-pass
|
||
|
|
|
||
|
|
#![feature(const_generics)]
|
||
|
|
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
|
||
|
|
|
||
|
|
trait Trait<const NAME: &'static str> {
|
||
|
|
type Assoc;
|
||
|
|
}
|
||
|
|
|
||
|
|
impl Trait<"0"> for () {
|
||
|
|
type Assoc = ();
|
||
|
|
}
|
||
|
|
|
||
|
|
fn main() {
|
||
|
|
let _: <() as Trait<"0">>::Assoc = ();
|
||
|
|
}
|