]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/require-parens-for-chained-comparison.stderr
Merge commit 'c19edfd71a1d0ddef86c2c67fdb40718d40a72b4' into sync_cg_clif-2022-07-25
[rust.git] / src / test / ui / parser / require-parens-for-chained-comparison.stderr
1 error: comparison operators cannot be chained
2   --> $DIR/require-parens-for-chained-comparison.rs:2:11
3    |
4 LL |     false == false == false;
5    |           ^^       ^^
6    |
7 help: split the comparison into two
8    |
9 LL |     false == false && false == false;
10    |                    ++++++++
11
12 error: comparison operators cannot be chained
13   --> $DIR/require-parens-for-chained-comparison.rs:6:11
14    |
15 LL |     false == 0 < 2;
16    |           ^^   ^
17    |
18 help: parenthesize the comparison
19    |
20 LL |     false == (0 < 2);
21    |              +     +
22
23 error: comparison operators cannot be chained
24   --> $DIR/require-parens-for-chained-comparison.rs:10:6
25    |
26 LL |     f<X>();
27    |      ^ ^
28    |
29 help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments
30    |
31 LL |     f::<X>();
32    |      ++
33
34 error: comparison operators cannot be chained
35   --> $DIR/require-parens-for-chained-comparison.rs:14:6
36    |
37 LL |     f<Result<Option<X>, Option<Option<X>>>(1, 2);
38    |      ^      ^
39    |
40 help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments
41    |
42 LL |     f::<Result<Option<X>, Option<Option<X>>>(1, 2);
43    |      ++
44
45 error: expected one of `!`, `.`, `::`, `;`, `?`, `else`, `{`, or an operator, found `,`
46   --> $DIR/require-parens-for-chained-comparison.rs:18:17
47    |
48 LL |     let _ = f<u8, i8>();
49    |                 ^ expected one of 8 possible tokens
50    |
51 help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments
52    |
53 LL |     let _ = f::<u8, i8>();
54    |              ++
55
56 error: expected `while`, `for`, `loop` or `{` after a label
57   --> $DIR/require-parens-for-chained-comparison.rs:22:17
58    |
59 LL |     let _ = f<'_, i8>();
60    |                 ^ expected `while`, `for`, `loop` or `{` after a label
61
62 error: expected one of `.`, `:`, `;`, `?`, `else`, `for`, `loop`, `while`, or an operator, found `,`
63   --> $DIR/require-parens-for-chained-comparison.rs:22:17
64    |
65 LL |     let _ = f<'_, i8>();
66    |                 ^ expected one of 9 possible tokens
67    |
68 help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments
69    |
70 LL |     let _ = f::<'_, i8>();
71    |              ++
72
73 error: expected `while`, `for`, `loop` or `{` after a label
74   --> $DIR/require-parens-for-chained-comparison.rs:27:9
75    |
76 LL |     f<'_>();
77    |         ^ expected `while`, `for`, `loop` or `{` after a label
78
79 error: comparison operators cannot be chained
80   --> $DIR/require-parens-for-chained-comparison.rs:27:6
81    |
82 LL |     f<'_>();
83    |      ^  ^
84    |
85 help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments
86    |
87 LL |     f::<'_>();
88    |      ++
89
90 error: comparison operators cannot be chained
91   --> $DIR/require-parens-for-chained-comparison.rs:32:14
92    |
93 LL |     let _ = f<u8>;
94    |              ^  ^
95    |
96    = help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments
97    = help: or use `(...)` if you meant to specify fn arguments
98
99 error: aborting due to 10 previous errors
100