1 #![feature(const_trait_impl)]
3 // revisions: yy yn ny nn
5 #[cfg_attr(any(yy, yn), const_trait)]
10 #[cfg_attr(any(yy, ny), const_trait)]
11 trait Bar: ~const Foo {}
12 //[ny,nn]~^ ERROR: ~const can only be applied to `#[const_trait]`
14 const fn foo<T: Bar>(x: &T) {
16 //[yn,yy]~^ ERROR the trait bound