Skip to content

Unable to build v0.0.248 with rustc 1.67.0 #3039

@winterqt

Description

@winterqt

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions