deny using default function in impl const Trait

This commit is contained in:
Deadbeef 2021-06-23 18:37:26 +08:00
parent 4573a4a879
commit 22a8d46ed3
No known key found for this signature in database
GPG key ID: 6525773485376D92
9 changed files with 105 additions and 0 deletions

View file

@ -11,6 +11,9 @@ impl const PartialEq for S {
fn eq(&self, _: &S) -> bool {
true
}
fn ne(&self, other: &S) -> bool {
!self.eq(other)
}
}
// This duplicate bound should not result in ambiguities. It should be equivalent to a single const