Rust errors / Everything else
Rust compiler error · checked with rustc 1.99.0
Rust error E0514: dependency compiled with different version of `rustc`
What it meansDependency compiled with different version of rustc.
The compiler team's explanation
Dependency compiled with different version of rustc.
Example of erroneous code:
a.rs
// compiled with stable `rustc`
#[crate_type = "lib"]
b.rs
// compiled with nightly `rustc`
#[crate_type = "lib"]
extern crate a; // error: found crate `a` compiled by an incompatible version
// of rustc
This error is caused when the version of rustc used to compile a crate, as stored in the binary's metadata, differs from the version of one of its dependencies. Many parts of Rust binaries are considered unstable. For instance, the Rust ABI is not stable between compiler versions. This means that the compiler cannot be sure about *how* to call a function between compiler versions, and therefore this error occurs.
This error can be fixed by:
- Using Cargo, the Rust package manager and Rustup, the Rust toolchain installer, automatically fixing this issue.
- Recompiling the crates with a uniform
rustcversion.
From rustc --explain E0514 (1.99.0), part of the Rust project, MIT or Apache-2.0. Official page.
Related errors
- E0061this function takes N arguments but M were supplied
- E0412cannot find type in this scope
- E0515cannot return reference to local variable
- E0728await is only allowed inside async functions and blocks
- E0455link kind `framework` is only supported on Apple targets
- E0511Invalid monomorphization of an intrinsic function was used
- E0524two closures require unique access to `*x` at the same time
Up next
Often hit nextE0061: this function takes N arguments but M were suppliedA related error from the same family.Read it next →Did this answer your question?