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