summary refs log tree commit diff
path: root/src/test/ui/parser/require-parens-for-chained-comparison.stderr
blob: afb964c17e255053e3403dc5dbe0c96a4faedaab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
error: comparison operators cannot be chained
  --> $DIR/require-parens-for-chained-comparison.rs:5:11
   |
LL |     false == false == false;
   |           ^^       ^^
   |
help: split the comparison into two
   |
LL |     false == false && false == false;
   |                    ^^^^^^^^

error: comparison operators cannot be chained
  --> $DIR/require-parens-for-chained-comparison.rs:9:11
   |
LL |     false == 0 < 2;
   |           ^^   ^
   |
help: parenthesize the comparison
   |
LL |     false == (0 < 2);
   |              ^     ^

error: comparison operators cannot be chained
  --> $DIR/require-parens-for-chained-comparison.rs:13:6
   |
LL |     f<X>();
   |      ^ ^
   |
help: use `::<...>` instead of `<...>` to specify type or const arguments
   |
LL |     f::<X>();
   |      ^^

error: comparison operators cannot be chained
  --> $DIR/require-parens-for-chained-comparison.rs:17:6
   |
LL |     f<Result<Option<X>, Option<Option<X>>>(1, 2);
   |      ^      ^
   |
help: use `::<...>` instead of `<...>` to specify type or const arguments
   |
LL |     f::<Result<Option<X>, Option<Option<X>>>(1, 2);
   |      ^^

error: comparison operators cannot be chained
  --> $DIR/require-parens-for-chained-comparison.rs:22:21
   |
LL |     let _ = identity<u8>;
   |                     ^  ^
   |
   = help: use `::<...>` instead of `<...>` to specify type or const arguments
   = help: or use `(...)` if you meant to specify fn arguments

error: aborting due to 5 previous errors