| commit | 438e26034c8b62dcadb0f83e2ea32cdd7bd05d8f | [log] [tgz] |
|---|---|---|
| author | David Tolnay <dtolnay@gmail.com> | Fri Mar 06 10:21:35 2020 -0800 |
| committer | David Tolnay <dtolnay@gmail.com> | Fri Mar 06 10:21:35 2020 -0800 |
| tree | e8cb7a7962707c673dbfcb49267d6e9215b99fb8 | |
| parent | ba5eb2de8cbd6fd2b033203b4c3c2d87e8b9f534 [diff] |
Make PartialEq work with reference lhs
diff --git a/syntax/atom.rs b/syntax/atom.rs index 903f561..9fb6554 100644 --- a/syntax/atom.rs +++ b/syntax/atom.rs
@@ -54,3 +54,15 @@ } } } + +impl PartialEq<Atom> for &Ident { + fn eq(&self, atom: &Atom) -> bool { + *self == atom + } +} + +impl PartialEq<Atom> for &Type { + fn eq(&self, atom: &Atom) -> bool { + *self == atom + } +}