diff --git a/src/test/ui/proc-macro/auxiliary/api/cmp.rs b/src/test/ui/proc-macro/auxiliary/api/cmp.rs index 3d17e9e350e64..5784a6e5d94db 100644 --- a/src/test/ui/proc-macro/auxiliary/api/cmp.rs +++ b/src/test/ui/proc-macro/auxiliary/api/cmp.rs @@ -1,4 +1,4 @@ -use proc_macro::{LineColumn, Punct}; +use proc_macro::{LineColumn, Punct, Spacing}; pub fn test() { test_line_column_ord(); @@ -14,8 +14,8 @@ fn test_line_column_ord() { } 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 == ':'; - } + let colon_alone = Punct::new(':', Spacing::Alone); + assert_eq!(colon_alone, ':'); + let colon_joint = Punct::new(':', Spacing::Joint); + assert_eq!(colon_joint, ':'); }