]> git.lizzy.rs Git - rust.git/blobdiff - library/proc_macro/tests/test.rs
Auto merge of #82127 - tgnottingham:tune-ahead-of-time-codegen, r=varkor
[rust.git] / library / proc_macro / tests / test.rs
index 331b330cf29f06326d9c34b621cceb41c20d4465..d2e6b0bb8093bb5ca329992d88d24d866c0153af 100644 (file)
@@ -1,6 +1,6 @@
 #![feature(proc_macro_span)]
 
-use proc_macro::LineColumn;
+use proc_macro::{LineColumn, Punct};
 
 #[test]
 fn test_line_column_ord() {
@@ -10,3 +10,11 @@ fn test_line_column_ord() {
     assert!(line0_column0 < line0_column1);
     assert!(line0_column1 < line1_column0);
 }
+
+#[test]
+fn test_punct_eq() {
+    // Good enough if it typechecks, since proc_macro::Punct can't exist in a test.
+    fn _check(punct: Punct) {
+        let _ = punct == ':';
+    }
+}