diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/rfc-2632-const-trait-impl/issue-100222.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/rfc-2632-const-trait-impl/issue-100222.rs b/src/test/ui/rfc-2632-const-trait-impl/issue-100222.rs index 1004bb28c..9f3f38ad4 100644 --- a/src/test/ui/rfc-2632-const-trait-impl/issue-100222.rs +++ b/src/test/ui/rfc-2632-const-trait-impl/issue-100222.rs @@ -16,6 +16,7 @@ pub trait IndexMut where Self: Index { impl Index for () { type Output = (); } +#[cfg(not(any(nn, yn)))] impl const IndexMut for <() as Index>::Output { const C: <Self as Index>::Output = (); type Assoc = <Self as Index>::Output; @@ -24,6 +25,15 @@ impl const IndexMut for <() as Index>::Output { {} } +#[cfg(any(nn, yn))] +impl IndexMut for <() as Index>::Output { + const C: <Self as Index>::Output = (); + type Assoc = <Self as Index>::Output; + fn foo(&mut self, x: <Self as Index>::Output) -> <Self as Index>::Output + where <Self as Index>::Output:, + {} +} + const C: <() as Index>::Output = (); fn main() {} |