Closed
Description
The following code produces a compiler error (as expected) on stable, but the compiler crashes on nightly.
pub struct ChunkIterator {
buf: [u8; 10],
}
impl ChunkIterator {
pub fn new() {
ChunkIterator {
buf: [0; ..10],
}
}
}
On stable:
error[E0308]: mismatched types
--> <anon>:8:22
|
8 | buf: [0; ..10],
| ----
| |
| expected usize, found struct `std::ops::RangeTo`
| in this macro invocation
|
= note: expected type `usize`
found type `std::ops::RangeTo<{integer}>`
On nightly:
error: internal compiler error: /checkout/src/librustc/hir/map/mod.rs:379: local_def_id: no entry for `22`, which has a map of `Some(EntryExpr(NodeId(20), expr(22: ::std::ops::RangeTo{end: 10,})))`