]> git.lizzy.rs Git - rust.git/blob - tests/ui/proc-macro/three-equals.rs
Rollup merge of #106788 - estebank:elaborate_pred_E0599, r=compiler-errors
[rust.git] / tests / ui / proc-macro / three-equals.rs
1 // aux-build:three-equals.rs
2
3 extern crate three_equals;
4
5 use three_equals::three_equals;
6
7 fn main() {
8     // This one is okay.
9     three_equals!(===);
10
11     // Need exactly three equals.
12     three_equals!(==); //~ ERROR found 2 equal signs, need exactly 3
13
14     // Need exactly three equals.
15     three_equals!(=====); //~ ERROR expected EOF
16
17     // Only equals accepted.
18     three_equals!(abc); //~ ERROR expected `=`
19
20     // Only equals accepted.
21     three_equals!(!!); //~ ERROR expected `=`
22
23     // Only three characters expected.
24     three_equals!(===a); //~ ERROR expected EOF
25 }