fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

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