1 // revisions: nn ny yn yy
3 #![feature(const_trait_impl, associated_type_defaults, const_mut_refs)]
5 #[cfg_attr(any(yn, yy), const_trait)]
10 #[cfg_attr(any(ny, yy), const_trait)]
11 pub trait IndexMut where Self: Index {
12 const C: <Self as Index>::Output;
13 type Assoc = <Self as Index>::Output;
14 fn foo(&mut self, x: <Self as Index>::Output) -> <Self as Index>::Output;
17 impl Index for () { type Output = (); }
19 impl const IndexMut for <() as Index>::Output {
20 const C: <Self as Index>::Output = ();
21 type Assoc = <Self as Index>::Output;
22 fn foo(&mut self, x: <Self as Index>::Output) -> <Self as Index>::Output
23 where <Self as Index>::Output:,
27 const C: <() as Index>::Output = ();