]> git.proxmox.com Git - rustc.git/blame - src/test/ui/range/issue-54505-no-literals.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / range / issue-54505-no-literals.stderr
CommitLineData
0bf4aa26
XL
1error[E0308]: mismatched types
2 --> $DIR/issue-54505-no-literals.rs:16:16
3 |
4LL | take_range(std::ops::Range { start: 0, end: 1 });
923072b8
FG
5 | ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6 | | |
7 | | expected reference, found struct `std::ops::Range`
8 | | help: consider borrowing here: `&std::ops::Range { start: 0, end: 1 }`
9 | arguments to this function are incorrect
0bf4aa26 10 |
60c5eb7d
XL
11 = note: expected reference `&_`
12 found struct `std::ops::Range<{integer}>`
923072b8
FG
13note: function defined here
14 --> $DIR/issue-54505-no-literals.rs:12:4
15 |
16LL | fn take_range(_r: &impl RangeBounds<i8>) {}
17 | ^^^^^^^^^^ -------------------------
0bf4aa26
XL
18
19error[E0308]: mismatched types
20 --> $DIR/issue-54505-no-literals.rs:21:16
21 |
22LL | take_range(::std::ops::Range { start: 0, end: 1 });
923072b8
FG
23 | ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24 | | |
25 | | expected reference, found struct `std::ops::Range`
26 | | help: consider borrowing here: `&::std::ops::Range { start: 0, end: 1 }`
27 | arguments to this function are incorrect
0bf4aa26 28 |
60c5eb7d
XL
29 = note: expected reference `&_`
30 found struct `std::ops::Range<{integer}>`
923072b8
FG
31note: function defined here
32 --> $DIR/issue-54505-no-literals.rs:12:4
33 |
34LL | fn take_range(_r: &impl RangeBounds<i8>) {}
35 | ^^^^^^^^^^ -------------------------
0bf4aa26
XL
36
37error[E0308]: mismatched types
38 --> $DIR/issue-54505-no-literals.rs:26:16
39 |
40LL | take_range(std::ops::RangeFrom { start: 1 });
923072b8
FG
41 | ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
42 | | |
43 | | expected reference, found struct `RangeFrom`
44 | | help: consider borrowing here: `&std::ops::RangeFrom { start: 1 }`
45 | arguments to this function are incorrect
0bf4aa26 46 |
60c5eb7d 47 = note: expected reference `&_`
1b1a35ee 48 found struct `RangeFrom<{integer}>`
923072b8
FG
49note: function defined here
50 --> $DIR/issue-54505-no-literals.rs:12:4
51 |
52LL | fn take_range(_r: &impl RangeBounds<i8>) {}
53 | ^^^^^^^^^^ -------------------------
0bf4aa26
XL
54
55error[E0308]: mismatched types
56 --> $DIR/issue-54505-no-literals.rs:31:16
57 |
58LL | take_range(::std::ops::RangeFrom { start: 1 });
923072b8
FG
59 | ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
60 | | |
61 | | expected reference, found struct `RangeFrom`
62 | | help: consider borrowing here: `&::std::ops::RangeFrom { start: 1 }`
63 | arguments to this function are incorrect
0bf4aa26 64 |
60c5eb7d 65 = note: expected reference `&_`
1b1a35ee 66 found struct `RangeFrom<{integer}>`
923072b8
FG
67note: function defined here
68 --> $DIR/issue-54505-no-literals.rs:12:4
69 |
70LL | fn take_range(_r: &impl RangeBounds<i8>) {}
71 | ^^^^^^^^^^ -------------------------
0bf4aa26
XL
72
73error[E0308]: mismatched types
74 --> $DIR/issue-54505-no-literals.rs:36:16
75 |
76LL | take_range(std::ops::RangeFull {});
923072b8
FG
77 | ---------- ^^^^^^^^^^^^^^^^^^^^^^
78 | | |
79 | | expected reference, found struct `RangeFull`
80 | | help: consider borrowing here: `&std::ops::RangeFull {}`
81 | arguments to this function are incorrect
0bf4aa26 82 |
60c5eb7d 83 = note: expected reference `&_`
1b1a35ee 84 found struct `RangeFull`
923072b8
FG
85note: function defined here
86 --> $DIR/issue-54505-no-literals.rs:12:4
87 |
88LL | fn take_range(_r: &impl RangeBounds<i8>) {}
89 | ^^^^^^^^^^ -------------------------
0bf4aa26
XL
90
91error[E0308]: mismatched types
92 --> $DIR/issue-54505-no-literals.rs:41:16
93 |
94LL | take_range(::std::ops::RangeFull {});
923072b8
FG
95 | ---------- ^^^^^^^^^^^^^^^^^^^^^^^^
96 | | |
97 | | expected reference, found struct `RangeFull`
98 | | help: consider borrowing here: `&::std::ops::RangeFull {}`
99 | arguments to this function are incorrect
0bf4aa26 100 |
60c5eb7d 101 = note: expected reference `&_`
1b1a35ee 102 found struct `RangeFull`
923072b8
FG
103note: function defined here
104 --> $DIR/issue-54505-no-literals.rs:12:4
105 |
106LL | fn take_range(_r: &impl RangeBounds<i8>) {}
107 | ^^^^^^^^^^ -------------------------
0bf4aa26
XL
108
109error[E0308]: mismatched types
110 --> $DIR/issue-54505-no-literals.rs:46:16
111 |
112LL | take_range(std::ops::RangeInclusive::new(0, 1));
923072b8
FG
113 | ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
114 | | |
115 | | expected reference, found struct `RangeInclusive`
116 | | help: consider borrowing here: `&std::ops::RangeInclusive::new(0, 1)`
117 | arguments to this function are incorrect
0bf4aa26 118 |
60c5eb7d 119 = note: expected reference `&_`
1b1a35ee 120 found struct `RangeInclusive<{integer}>`
923072b8
FG
121note: function defined here
122 --> $DIR/issue-54505-no-literals.rs:12:4
123 |
124LL | fn take_range(_r: &impl RangeBounds<i8>) {}
125 | ^^^^^^^^^^ -------------------------
0bf4aa26
XL
126
127error[E0308]: mismatched types
128 --> $DIR/issue-54505-no-literals.rs:51:16
129 |
130LL | take_range(::std::ops::RangeInclusive::new(0, 1));
923072b8
FG
131 | ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
132 | | |
133 | | expected reference, found struct `RangeInclusive`
134 | | help: consider borrowing here: `&::std::ops::RangeInclusive::new(0, 1)`
135 | arguments to this function are incorrect
0bf4aa26 136 |
60c5eb7d 137 = note: expected reference `&_`
1b1a35ee 138 found struct `RangeInclusive<{integer}>`
923072b8
FG
139note: function defined here
140 --> $DIR/issue-54505-no-literals.rs:12:4
141 |
142LL | fn take_range(_r: &impl RangeBounds<i8>) {}
143 | ^^^^^^^^^^ -------------------------
0bf4aa26
XL
144
145error[E0308]: mismatched types
146 --> $DIR/issue-54505-no-literals.rs:56:16
147 |
148LL | take_range(std::ops::RangeTo { end: 5 });
923072b8
FG
149 | ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
150 | | |
151 | | expected reference, found struct `RangeTo`
152 | | help: consider borrowing here: `&std::ops::RangeTo { end: 5 }`
153 | arguments to this function are incorrect
0bf4aa26 154 |
60c5eb7d 155 = note: expected reference `&_`
1b1a35ee 156 found struct `RangeTo<{integer}>`
923072b8
FG
157note: function defined here
158 --> $DIR/issue-54505-no-literals.rs:12:4
159 |
160LL | fn take_range(_r: &impl RangeBounds<i8>) {}
161 | ^^^^^^^^^^ -------------------------
0bf4aa26
XL
162
163error[E0308]: mismatched types
164 --> $DIR/issue-54505-no-literals.rs:61:16
165 |
166LL | take_range(::std::ops::RangeTo { end: 5 });
923072b8
FG
167 | ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
168 | | |
169 | | expected reference, found struct `RangeTo`
170 | | help: consider borrowing here: `&::std::ops::RangeTo { end: 5 }`
171 | arguments to this function are incorrect
0bf4aa26 172 |
60c5eb7d 173 = note: expected reference `&_`
1b1a35ee 174 found struct `RangeTo<{integer}>`
923072b8
FG
175note: function defined here
176 --> $DIR/issue-54505-no-literals.rs:12:4
177 |
178LL | fn take_range(_r: &impl RangeBounds<i8>) {}
179 | ^^^^^^^^^^ -------------------------
0bf4aa26
XL
180
181error[E0308]: mismatched types
182 --> $DIR/issue-54505-no-literals.rs:66:16
183 |
184LL | take_range(std::ops::RangeToInclusive { end: 5 });
923072b8
FG
185 | ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
186 | | |
187 | | expected reference, found struct `RangeToInclusive`
188 | | help: consider borrowing here: `&std::ops::RangeToInclusive { end: 5 }`
189 | arguments to this function are incorrect
0bf4aa26 190 |
60c5eb7d 191 = note: expected reference `&_`
1b1a35ee 192 found struct `RangeToInclusive<{integer}>`
923072b8
FG
193note: function defined here
194 --> $DIR/issue-54505-no-literals.rs:12:4
195 |
196LL | fn take_range(_r: &impl RangeBounds<i8>) {}
197 | ^^^^^^^^^^ -------------------------
0bf4aa26
XL
198
199error[E0308]: mismatched types
200 --> $DIR/issue-54505-no-literals.rs:71:16
201 |
202LL | take_range(::std::ops::RangeToInclusive { end: 5 });
923072b8
FG
203 | ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
204 | | |
205 | | expected reference, found struct `RangeToInclusive`
206 | | help: consider borrowing here: `&::std::ops::RangeToInclusive { end: 5 }`
207 | arguments to this function are incorrect
0bf4aa26 208 |
60c5eb7d 209 = note: expected reference `&_`
1b1a35ee 210 found struct `RangeToInclusive<{integer}>`
923072b8
FG
211note: function defined here
212 --> $DIR/issue-54505-no-literals.rs:12:4
213 |
214LL | fn take_range(_r: &impl RangeBounds<i8>) {}
215 | ^^^^^^^^^^ -------------------------
0bf4aa26
XL
216
217error: aborting due to 12 previous errors
218
219For more information about this error, try `rustc --explain E0308`.