about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@gmail.com>2020-11-01 09:40:30 -0800
committerDavid Tolnay <dtolnay@gmail.com>2020-11-01 09:42:42 -0800
commit4652032c1472d3be3bb1a257393daea7bb2743f1 (patch)
treee5645fa1de4a643d1f30aa0809441912064701d2
parentb01702578d21960996b2402a1661f3752a250bcd (diff)
downloadrust-4652032c1472d3be3bb1a257393daea7bb2743f1.tar.gz
rust-4652032c1472d3be3bb1a257393daea7bb2743f1.zip
Add Punct PartialEq smoke test
-rw-r--r--library/proc_macro/tests/test.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/library/proc_macro/tests/test.rs b/library/proc_macro/tests/test.rs
index 331b330cf29..d2e6b0bb809 100644
--- a/library/proc_macro/tests/test.rs
+++ b/library/proc_macro/tests/test.rs
@@ -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 == ':';
+    }
+}