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