Closed
Description
The CI for libssh2-sys
started to fail today with this error:
error: `X...` range patterns are not supported
--> C:\Users\wez\.cargo\registry\src\github.com-1ecc6299db9ec823\extprim-1.7.0\src\traits.rs:94:21
|
94 | 1 ... $e => u128::new(mantissa) << exp,
| ^^^^^ help: try using the maximum value for the type: `1...MAX`
...
117 | impl_to_extra_primitive_for_float!(f32, 23, 104, 103);
| ------------------------------------------------------ in this macro invocation
It appears as though the compiler doesn't see 1 ... $e
and only sees 1...
as the range expression and then generates this error.
The expression is inside a macro_rules!
expansion.
You can reproduce this by cloning the extprim
repo and building it:
$ git clone git@github.com:kennytm/extprim.git
$ cd extprim
$ cargo +nightly build
The build succeeds on the stable channel and much older releases, so this appears to be a regression in the nightly.
Here's the version on my windows system, but note that this also fails on linux and macos too:
rustc 1.38.0-nightly (4560cb830 2019-07-28)
binary: rustc
commit-hash: 4560cb830fce63fcffdc4558f4281aaac6a3a1ba
commit-date: 2019-07-28
host: x86_64-pc-windows-msvc
release: 1.38.0-nightly
LLVM version: 9.0