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