We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3c16c0e commit faad7e2Copy full SHA for faad7e2
src/test/ui/proc-macro/auxiliary/api/cmp.rs
@@ -1,4 +1,4 @@
1
-use proc_macro::{LineColumn, Punct};
+use proc_macro::{LineColumn, Punct, Spacing};
2
3
pub fn test() {
4
test_line_column_ord();
@@ -14,8 +14,8 @@ fn test_line_column_ord() {
14
}
15
16
fn test_punct_eq() {
17
- // Good enough if it typechecks, since proc_macro::Punct can't exist in a test.
18
- fn _check(punct: Punct) {
19
- let _ = punct == ':';
20
- }
+ let colon_alone = Punct::new(':', Spacing::Alone);
+ assert_eq!(colon_alone, ':');
+ let colon_joint = Punct::new(':', Spacing::Joint);
+ assert_eq!(colon_joint, ':');
21
0 commit comments