-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
A-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTC-bugCategory: This is a bug.Category: This is a bug.P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
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 [email protected]: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
Metadata
Metadata
Assignees
Labels
A-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTC-bugCategory: This is a bug.Category: This is a bug.P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.