]> git.lizzy.rs Git - rust.git/blobdiff - library/proc_macro/src/lib.rs
Rollup merge of #81154 - dylni:improve-design-of-assert-len, r=KodrAus
[rust.git] / library / proc_macro / src / lib.rs
index a89e7b53e43c4fbc1c0b06cad12a16fd58b458eb..5f1f7d8cac418f89481ca5049fb320068c141ded 100644 (file)
@@ -842,13 +842,20 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
     }
 }
 
-#[stable(feature = "proc_macro_punct_eq", since = "1.49.0")]
+#[stable(feature = "proc_macro_punct_eq", since = "1.50.0")]
 impl PartialEq<char> for Punct {
     fn eq(&self, rhs: &char) -> bool {
         self.as_char() == *rhs
     }
 }
 
+#[stable(feature = "proc_macro_punct_eq_flipped", since = "1.52.0")]
+impl PartialEq<Punct> for char {
+    fn eq(&self, rhs: &Punct) -> bool {
+        *self == rhs.as_char()
+    }
+}
+
 /// An identifier (`ident`).
 #[derive(Clone)]
 #[stable(feature = "proc_macro_lib2", since = "1.29.0")]