ruff: Unable to build v0.0.248 with rustc 1.67.0
When building Ruff v0.0.248 with rustc 1.67.0, I receive the following compilation error:
error[E0080]: evaluation of constant value failed
--> crates/ruff_formatter/src/utility_types.rs:5:24
|
5 | const _: i32 = 0 / $expr as i32;
| ^^^^^^^^^^^^^^^^ attempt to divide `0_i32` by zero
|
::: crates/ruff_formatter/src/format_element.rs:388:1
|
388 | static_assert!(std::mem::size_of::<crate::FormatElement>() == 24usize);
| ---------------------------------------------------------------------- in this macro invocation
|
= note: this error originates in the macro `static_assert` (in Nightly builds, run with -Z macro-backtrace for more info)
rustc 1.67.0 (fc594f156 2023-01-24) (built from a source tarball)
binary: rustc
commit-hash: fc594f15669680fa70d255faec3ca3fb507c3405
commit-date: 2023-01-24
host: aarch64-apple-darwin
release: 1.67.0
LLVM version: 15.0.7
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 2
- Comments: 24 (17 by maintainers)
Commits related to this issue
- Remove unused `AsFormat` trait for `Option<T>` (#3041) We should re-add this, but it's currently unused and doesn't compile under 1.66.0. See: #3039. — committed to astral-sh/ruff by charliermarsh a year ago
Yeah this should be all fixed up – I believe I fixed the issues in the non
ruff_cli
crates, and will avoid such breakages going forward.I somehow just hit this. I have no idea what changed, if anything.