fork/rust

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

borsAuto merge of #68568 - pietroalbini:stable-next, r=pietroalbini5e1a799842b

1.41.0
2.3 KiB75 linesraw
1error[E0308]: mismatched types
2  --> $DIR/issue-54505.rs:14:16
3   |
4LL |     take_range(0..1);
5   |                ^^^^
6   |                |
7   |                expected reference, found struct `std::ops::Range`
8   |                help: consider borrowing here: `&(0..1)`
9   |
10   = note: expected reference `&_`
11                 found struct `std::ops::Range<{integer}>`
12
13error[E0308]: mismatched types
14  --> $DIR/issue-54505.rs:19:16
15   |
16LL |     take_range(1..);
17   |                ^^^
18   |                |
19   |                expected reference, found struct `std::ops::RangeFrom`
20   |                help: consider borrowing here: `&(1..)`
21   |
22   = note: expected reference `&_`
23                 found struct `std::ops::RangeFrom<{integer}>`
24
25error[E0308]: mismatched types
26  --> $DIR/issue-54505.rs:24:16
27   |
28LL |     take_range(..);
29   |                ^^
30   |                |
31   |                expected reference, found struct `std::ops::RangeFull`
32   |                help: consider borrowing here: `&(..)`
33   |
34   = note: expected reference `&_`
35                 found struct `std::ops::RangeFull`
36
37error[E0308]: mismatched types
38  --> $DIR/issue-54505.rs:29:16
39   |
40LL |     take_range(0..=1);
41   |                ^^^^^
42   |                |
43   |                expected reference, found struct `std::ops::RangeInclusive`
44   |                help: consider borrowing here: `&(0..=1)`
45   |
46   = note: expected reference `&_`
47                 found struct `std::ops::RangeInclusive<{integer}>`
48
49error[E0308]: mismatched types
50  --> $DIR/issue-54505.rs:34:16
51   |
52LL |     take_range(..5);
53   |                ^^^
54   |                |
55   |                expected reference, found struct `std::ops::RangeTo`
56   |                help: consider borrowing here: `&(..5)`
57   |
58   = note: expected reference `&_`
59                 found struct `std::ops::RangeTo<{integer}>`
60
61error[E0308]: mismatched types
62  --> $DIR/issue-54505.rs:39:16
63   |
64LL |     take_range(..=42);
65   |                ^^^^^
66   |                |
67   |                expected reference, found struct `std::ops::RangeToInclusive`
68   |                help: consider borrowing here: `&(..=42)`
69   |
70   = note: expected reference `&_`
71                 found struct `std::ops::RangeToInclusive<{integer}>`
72
73error: aborting due to 6 previous errors
74
75For more information about this error, try `rustc --explain E0308`.