2020-08-09 06:19:57 +00:00
|
|
|
//[full] check-pass
|
|
|
|
|
// revisions: full min
|
|
|
|
|
|
|
|
|
|
#![cfg_attr(full, feature(const_generics))]
|
|
|
|
|
#![cfg_attr(full, allow(incomplete_features))]
|
2020-04-09 00:57:27 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
trait Trait<const NAME: &'static str> {
|
2020-08-18 22:44:06 +02:00
|
|
|
//[min]~^ ERROR `&'static str` is forbidden
|
2020-04-09 00:57:27 +01:00
|
|
|
type Assoc;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl Trait<"0"> for () {
|
|
|
|
|
type Assoc = ();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
let _: <() as Trait<"0">>::Assoc = ();
|
|
|
|
|
}
|