We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
impl PartialEq<Punct> for char
1 parent 9b471a3 commit 1839748Copy full SHA for 1839748
library/proc_macro/src/lib.rs
@@ -842,13 +842,20 @@ impl fmt::Debug for Punct {
842
}
843
844
845
-#[stable(feature = "proc_macro_punct_eq", since = "1.49.0")]
+#[stable(feature = "proc_macro_punct_eq", since = "1.50.0")]
846
impl PartialEq<char> for Punct {
847
fn eq(&self, rhs: &char) -> bool {
848
self.as_char() == *rhs
849
850
851
852
+#[stable(feature = "proc_macro_punct_eq_flipped", since = "1.52.0")]
853
+impl PartialEq<Punct> for char {
854
+ fn eq(&self, rhs: &Punct) -> bool {
855
+ *self == rhs.as_char()
856
+ }
857
+}
858
+
859
/// An identifier (`ident`).
860
#[derive(Clone)]
861
#[stable(feature = "proc_macro_lib2", since = "1.29.0")]
0 commit comments