-
Notifications
You must be signed in to change notification settings - Fork 87
Closed
Description
Trying to compile this crate with bitflags 2.2 gives a compilation error.
Minimal example:
Cargo.toml
[package]
name = "minimal-bitfields"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
mysql_common = "0.30.3"
main.rs
fn main() {
println!("Hello, world!");
}
Compilation output:
error: recursion limit reached while expanding `__declare_bitflags!`
--> C:\Users\jaumelopez\.cargo\registry\src\github.com-1ecc6299db9ec823\mysql_common-0.30.3\src\constants.rs:78:1
|
78 | / my_bitflags! {
79 | | CapabilityFlags,
80 | | #[error("Unknown flags in the raw value of CapabilityFlags (raw={:b})", _0)]
81 | | UnknownCapabilityFlags,
... |
357 | | }
358 | | }
| |_^
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`mysql_common`)
= note: this error originates in the macro `__declare_bitflags` which comes from the expansion of the macro `my_bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)
"Pinning" bitflags to 2.1 fixes the compilation error.
"Fixed" Cargo.toml
[package]
name = "minimal-bitfields"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
bitflags = "=2.1"
mysql_common = "0.30.3"
I'm uncertain if this is a bug in the upstream crate or in how mysql_common uses it.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels