]> git.lizzy.rs Git - rust.git/blob - 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
1 #![feature(proc_macro_span)]
2
3 use proc_macro::{LineColumn, Punct};
4
5 #[test]
6 fn test_line_column_ord() {
7     let line0_column0 = LineColumn { line: 0, column: 0 };
8     let line0_column1 = LineColumn { line: 0, column: 1 };
9     let line1_column0 = LineColumn { line: 1, column: 0 };
10     assert!(line0_column0 < line0_column1);
11     assert!(line0_column1 < line1_column0);
12 }
13
14 #[test]
15 fn test_punct_eq() {
16     // Good enough if it typechecks, since proc_macro::Punct can't exist in a test.
17     fn _check(punct: Punct) {
18         let _ = punct == ':';
19     }
20 }