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