]> git.proxmox.com Git - rustc.git/blob - tests/ui/range/issue-54505.stderr
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / range / issue-54505.stderr
1 error[E0308]: mismatched types
2 --> $DIR/issue-54505.rs:14:16
3 |
4 LL | take_range(0..1);
5 | ---------- ^^^^
6 | | |
7 | | expected reference, found struct `Range`
8 | | help: consider borrowing here: `&(0..1)`
9 | arguments to this function are incorrect
10 |
11 = note: expected reference `&_`
12 found struct `std::ops::Range<{integer}>`
13 note: function defined here
14 --> $DIR/issue-54505.rs:10:4
15 |
16 LL | fn take_range(_r: &impl RangeBounds<i8>) {}
17 | ^^^^^^^^^^ -------------------------
18
19 error[E0308]: mismatched types
20 --> $DIR/issue-54505.rs:19:16
21 |
22 LL | take_range(1..);
23 | ---------- ^^^
24 | | |
25 | | expected reference, found struct `RangeFrom`
26 | | help: consider borrowing here: `&(1..)`
27 | arguments to this function are incorrect
28 |
29 = note: expected reference `&_`
30 found struct `RangeFrom<{integer}>`
31 note: function defined here
32 --> $DIR/issue-54505.rs:10:4
33 |
34 LL | fn take_range(_r: &impl RangeBounds<i8>) {}
35 | ^^^^^^^^^^ -------------------------
36
37 error[E0308]: mismatched types
38 --> $DIR/issue-54505.rs:24:16
39 |
40 LL | take_range(..);
41 | ---------- ^^
42 | | |
43 | | expected reference, found struct `RangeFull`
44 | | help: consider borrowing here: `&(..)`
45 | arguments to this function are incorrect
46 |
47 = note: expected reference `&_`
48 found struct `RangeFull`
49 note: function defined here
50 --> $DIR/issue-54505.rs:10:4
51 |
52 LL | fn take_range(_r: &impl RangeBounds<i8>) {}
53 | ^^^^^^^^^^ -------------------------
54
55 error[E0308]: mismatched types
56 --> $DIR/issue-54505.rs:29:16
57 |
58 LL | take_range(0..=1);
59 | ---------- ^^^^^
60 | | |
61 | | expected reference, found struct `RangeInclusive`
62 | | help: consider borrowing here: `&(0..=1)`
63 | arguments to this function are incorrect
64 |
65 = note: expected reference `&_`
66 found struct `RangeInclusive<{integer}>`
67 note: function defined here
68 --> $DIR/issue-54505.rs:10:4
69 |
70 LL | fn take_range(_r: &impl RangeBounds<i8>) {}
71 | ^^^^^^^^^^ -------------------------
72
73 error[E0308]: mismatched types
74 --> $DIR/issue-54505.rs:34:16
75 |
76 LL | take_range(..5);
77 | ---------- ^^^
78 | | |
79 | | expected reference, found struct `RangeTo`
80 | | help: consider borrowing here: `&(..5)`
81 | arguments to this function are incorrect
82 |
83 = note: expected reference `&_`
84 found struct `RangeTo<{integer}>`
85 note: function defined here
86 --> $DIR/issue-54505.rs:10:4
87 |
88 LL | fn take_range(_r: &impl RangeBounds<i8>) {}
89 | ^^^^^^^^^^ -------------------------
90
91 error[E0308]: mismatched types
92 --> $DIR/issue-54505.rs:39:16
93 |
94 LL | take_range(..=42);
95 | ---------- ^^^^^
96 | | |
97 | | expected reference, found struct `RangeToInclusive`
98 | | help: consider borrowing here: `&(..=42)`
99 | arguments to this function are incorrect
100 |
101 = note: expected reference `&_`
102 found struct `RangeToInclusive<{integer}>`
103 note: function defined here
104 --> $DIR/issue-54505.rs:10:4
105 |
106 LL | fn take_range(_r: &impl RangeBounds<i8>) {}
107 | ^^^^^^^^^^ -------------------------
108
109 error: aborting due to 6 previous errors
110
111 For more information about this error, try `rustc --explain E0308`.