diff options
| author | David Tolnay <dtolnay@gmail.com> | 2020-11-01 09:40:30 -0800 |
|---|---|---|
| committer | David Tolnay <dtolnay@gmail.com> | 2020-11-01 09:42:42 -0800 |
| commit | 4652032c1472d3be3bb1a257393daea7bb2743f1 (patch) | |
| tree | e5645fa1de4a643d1f30aa0809441912064701d2 | |
| parent | b01702578d21960996b2402a1661f3752a250bcd (diff) | |
| download | rust-4652032c1472d3be3bb1a257393daea7bb2743f1.tar.gz rust-4652032c1472d3be3bb1a257393daea7bb2743f1.zip | |
Add Punct PartialEq smoke test
| -rw-r--r-- | library/proc_macro/tests/test.rs | 10 |
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 == ':'; + } +} |
