fork/rust

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

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

1.42.0
1.4 KiB51 linesraw
1error: comparison operators cannot be chained
2  --> $DIR/issue-40396.rs:2:20
3   |
4LL |     (0..13).collect<Vec<i32>>();
5   |                    ^^^^^
6   |
7help: split the comparison into two...
8   |
9LL |     (0..13).collect < Vec && Vec <i32>>();
10   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11help: ...or parenthesize one of the comparisons
12   |
13LL |     ((0..13).collect < Vec) <i32>>();
14   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
15help: use `::<...>` instead of `<...>` to specify type arguments
16   |
17LL |     (0..13).collect::<Vec<i32>>();
18   |                    ^^
19
20error: comparison operators cannot be chained
21  --> $DIR/issue-40396.rs:4:8
22   |
23LL |     Vec<i32>::new();
24   |        ^^^^^
25   |
26help: use `::<...>` instead of `<...>` to specify type arguments
27   |
28LL |     Vec::<i32>::new();
29   |        ^^
30
31error: comparison operators cannot be chained
32  --> $DIR/issue-40396.rs:6:20
33   |
34LL |     (0..13).collect<Vec<i32>();
35   |                    ^^^^^
36   |
37help: split the comparison into two...
38   |
39LL |     (0..13).collect < Vec && Vec <i32>();
40   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
41help: ...or parenthesize one of the comparisons
42   |
43LL |     ((0..13).collect < Vec) <i32>();
44   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
45help: use `::<...>` instead of `<...>` to specify type arguments
46   |
47LL |     (0..13).collect::<Vec<i32>();
48   |                    ^^
49
50error: aborting due to 3 previous errors
51