Skip to content

Commit 13b668b

Browse files
committed
Add additional test cases
1 parent e8b546b commit 13b668b

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

tests/ui/parser/eq-gt-to-gt-eq.rs

+16-5
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,38 @@
11
// Check that we try to correct `=>` to `>=` in conditions.
22

3-
fn foo() {
3+
fn main() {
44
let a = 0;
55
let b = 4;
66
if a => b { //~ERROR
77
println!("yay!");
88
}
99
}
1010

11+
fn foo() {
12+
let a = 0;
13+
if a => 4 { //~ERROR
14+
println!("yay!");
15+
}
16+
}
17+
1118
fn bar() {
1219
let a = 0;
1320
let b = 4;
14-
if a = >b { //~ERROR
21+
if a => b && true { //~ERROR
1522
println!("yay!");
1623
}
1724
}
1825

19-
fn baz() {
26+
fn qux() {
2027
let a = 0;
2128
let b = 4;
22-
if a = > b { //~ERROR
29+
if true && a => b { //~ERROR
2330
println!("yay!");
2431
}
2532
}
2633

27-
fn main() {}
34+
fn baz() {
35+
let a = 0;
36+
let b = 4;
37+
let _ = a => b; //~ERROR
38+
}

0 commit comments

Comments
 (0)