We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The file exists to trigger a compiler error when the user uses an invalid combination of features:
json/src/features_check/error.rs
Line 1 in 2e15e3d
json/src/features_check/mod.rs
Lines 10 to 13 in 2e15e3d
The invalid code interferes with static analysis tools like cargo-geiger:
$ cargo-geiger --version cargo-geiger 0.11.7 $ cargo geiger ... Failed to parse file: /Users/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde_json-1.0.115/src/features_check/error.rs, Syn(Error("expected one of: `fn`, `extern`, `use`, `static`, `const`, `unsafe`, `mod`, `type`, `struct`, `enum`, `union`, `trait`, `auto`, `impl`, `default`, `macro`, identifier, `self`, `super`, `crate`, `::`"), "/Users/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde_json-1.0.115/src/features_check/error.rs") ...
Let replace the invalid code with a call to the std::compile_error! macro:
std::compile_error!
#[cfg(not(any(feature = "std", feature = "alloc")))] compile_error!("serde_json requires that either `std` (default) or `alloc` feature is enabled");
The text was updated successfully, but these errors were encountered:
features_check
25dc750
Successfully merging a pull request may close this issue.
The file exists to trigger a compiler error when the user uses an invalid combination of features:
json/src/features_check/error.rs
Line 1 in 2e15e3d
json/src/features_check/mod.rs
Lines 10 to 13 in 2e15e3d
The invalid code interferes with static analysis tools like cargo-geiger:
Let replace the invalid code with a call to the
std::compile_error!
macro:The text was updated successfully, but these errors were encountered: