Skip to content

test to_string_in_format_args_incremental fails in a read-only working directory #11126

New issue

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

Open
Noratrieb opened this issue Jul 8, 2023 · 12 comments · May be fixed by #14910
Open

test to_string_in_format_args_incremental fails in a read-only working directory #11126

Noratrieb opened this issue Jul 8, 2023 · 12 comments · May be fixed by #14910

Comments

@Noratrieb
Copy link
Member

Description

The test creates a file in the current working directory, which doesn't work in rust-lang/rust CI. It should be changed to create the incremental directory somewhere else, I'm not sure what the best solution would be here.

//@run-rustfix
//@compile-flags: -C incremental=target/debug/test/incr

// see https://github.com/rust-lang/rust-clippy/issues/10969

fn main() {
    let s = "Hello, world!";
    println!("{}", s.to_string());
}

I deleted the test in rust-lang/rust#113450 so it will be removed in the next sync.

cc @Alexendoo @flip1995 @oli-obk

Version

master, 3a1fc266654b9b56c07554eff3d5956bb84d8ef5

Additional Labels

No response

@Noratrieb Noratrieb changed the title test to_string_in_format_args_incremental fails in a read-only file system test to_string_in_format_args_incremental fails in a read-only working directory Jul 8, 2023
@oli-obk
Copy link
Contributor

oli-obk commented Jul 10, 2023

We could add some variable-replacement scheme so that we can specify $TMP_DIR which would give every test its very own temporary directory

bors added a commit that referenced this issue Sep 12, 2023
Ignore span's parents in `collect_ast_format_args`/`find_format_args`

Fixes #11470, covers some cases missed by #10980

Can't have a test yet because of #11126 but it works locally

changelog: none

r? `@dswij`
@utkrsharmaa
Copy link

I am currently getting this issue as well, When i ran cargo uibless once, all tests passes except for the lint I'm currently working on. And then i got 2 failures after running cargo test --test compile-test -- --bless and one of them was to_string_in_format_args_incremental.fixed.

I'm not experienced enough to know what the solution is and am currently stuck because of this. An update on the situation would be reassuring, Thank you all.

@Alexendoo
Copy link
Member

What was the other, and could you show the errors @utkrsharmaa?

Also huh, the test still exists in the clippy repo

@utkrsharmaa
Copy link

utkrsharmaa commented May 27, 2025

@Alexendoo The other one was the Lint I'm currently working on, It's my first time writing a lint so i was struggling getting the tests to pass. I posted a comment regarding under the issue.

I really don't know why it's causing problems. Maybe it's the //@compile-flags: -C incremental=target/debug/test/incr mentioned in the .fixed file which i need to use. Here's the output when i run a full cargo uitest instead of TESTNAME=mylint cargo uitest

FAILED TEST: tests/ui/to_string_in_format_args_incremental.fixed
command: CLIPPY_CONF_DIR="tests" RUSTC_ICE="0" "/home/kin/Desktop/open/rust-clippy/target/debug/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Dwarnings" "-Ldependency=/home/kin/Desktop/open/rust-clippy/target/debug/deps" "--extern=clippy_config=/home/kin/Desktop/open/rust-clippy/target/debug/deps/libclippy_config-c437b4d7cd2c92ad.rlib" "--extern=clippy_lints=/home/kin/Desktop/open/rust-clippy/target/debug/deps/libclippy_lints-84c4fa8315a184b4.rlib" "--extern=clippy_utils=/home/kin/Desktop/open/rust-clippy/target/debug/deps/libclippy_utils-f2b48e2f14b7d21b.rlib" "--extern=futures=/home/kin/Desktop/open/rust-clippy/target/debug/deps/libfutures-aa4ff275b96de74b.rlib" "--extern=if_chain=/home/kin/Desktop/open/rust-clippy/target/debug/deps/libif_chain-29ce38907b177558.rlib" "--extern=itertools=/home/kin/Desktop/open/rust-clippy/target/debug/deps/libitertools-71dce43a067d1845.rlib" "--extern=parking_lot=/home/kin/Desktop/open/rust-clippy/target/debug/deps/libparking_lot-ff4ee963c30c9f76.rlib" "--extern=quote=/home/kin/Desktop/open/rust-clippy/target/debug/deps/libquote-a701a81c28ede506.rlib" "--extern=regex=/home/kin/Desktop/open/rust-clippy/target/debug/deps/libregex-1b6fbb71c3f53d74.rlib" "--extern=serde=/home/kin/Desktop/open/rust-clippy/target/debug/deps/libserde-12f093ef6003304f.rlib" "--extern=serde_derive=/home/kin/.rustup/toolchains/nightly-2025-05-14-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libserde_derive-fe9a7505d3290aa4.so" "--extern=syn=/home/kin/Desktop/open/rust-clippy/target/debug/deps/libsyn-7c51c2fc387254a9.rlib" "--extern=tokio=/home/kin/Desktop/open/rust-clippy/target/debug/deps/libtokio-b07ae1c532107135.rlib" "--out-dir" "target/ui_test/0/tests/ui" "tests/ui/to_string_in_format_args_incremental.fixed" "-C" "incremental=target/debug/test/incr" "--edition" "2024" "--crate-name" "__to_string_in_format_args_incremental_1"

error: test got exit status: 101, but expected 0
 = note: after rustfix is applied, all errors should be gone, but weren't

full stderr:
error: internal compiler error: encountered incremental compilation error with lints_that_dont_need_to_run(0-0)
   |
   = help: This is a known issue with the compiler. Run `cargo clean -p __to_string_in_format_args_incremental_1` or `cargo clean` to allow your project to compile
   = note: Please follow the instructions below to create a bug report with the provided information
   = note: See <https://github.com/rust-lang/rust/issues/84970> for more information


thread 'rustc' panicked at /rustc/414482f6a0d4e7290f614300581a0b55442552a3/compiler/rustc_query_system/src/query/plumbing.rs:739:9:
Found unstable fingerprints for lints_that_dont_need_to_run(0-0): UnordSet { inner: {LintId { lint: Lint { name: "clippy::INEFFICIENT_TO_STRING", default_level: Allow, desc: "using `to_string` on `&&T` where `T: ToString`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::FLOAT_CMP", default_level: Allow, desc: "using `==` or `!=` on float values instead of comparing difference with an allowed error", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "UNUSED_ALLOCATION", default_level: Warn, desc: "detects unnecessary allocations that can be eliminated", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "UNUSED_ASSIGNMENTS", default_level: Warn, desc: "detect assignments that will never be read", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "AMBIGUOUS_NEGATIVE_LITERALS", default_level: Allow, desc: "ambiguous negative literals operations", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::SUBOPTIMAL_FLOPS", default_level: Allow, desc: "usage of sub-optimal floating point operations", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::ITER_OVER_HASH_TYPE", default_level: Allow, desc: "iterating over unordered hash-based types (`HashMap` and `HashSet`)", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::CAST_LOSSLESS", default_level: Allow, desc: "casts using `as` that are known to be lossless, e.g., `x as u64` where `x: u8`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::EMPTY_ENUM", default_level: Allow, desc: "enum with no variants", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::SINGLE_MATCH_ELSE", default_level: Allow, desc: "a `match` statement with two arms where the second arm's pattern is a placeholder instead of a specific match pattern", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::UNSEPARATED_LITERAL_SUFFIX", default_level: Allow, desc: "literals whose suffix is not separated by an underscore", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::PATTERN_TYPE_MISMATCH", default_level: Allow, desc: "type of pattern does not match the expression type", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::SINGLE_CHAR_PATTERN", default_level: Allow, desc: "using a single-character str where a char could be used, e.g., `_.split(\"x\")`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "UNUSED_MUT", default_level: Warn, desc: "detect mut variables which don't need to be mutable", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::PANIC", default_level: Allow, desc: "usage of the `panic!` macro", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "IMPL_TRAIT_REDUNDANT_CAPTURES", default_level: Allow, desc: "redundant precise-capturing `use<...>` syntax on an `impl Trait`", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::RC_MUTEX", default_level: Allow, desc: "usage of `Rc<Mutex<T>>`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::UNNECESSARY_STRUCT_INITIALIZATION", default_level: Allow, desc: "struct built from a base that can be written mode concisely", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::UNINHABITED_REFERENCES", default_level: Allow, desc: "reference to uninhabited type", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::SHADOW_UNRELATED", default_level: Allow, desc: "rebinding a name without even using the original value", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::EXIT", default_level: Allow, desc: "detects `std::process::exit` calls", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MANUAL_IS_POWER_OF_TWO", default_level: Allow, desc: "manually reimplementing `is_power_of_two`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::TRAIT_DUPLICATION_IN_BOUNDS", default_level: Allow, desc: "check if the same trait bounds are specified more than once during a generic declaration", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "UNUSED_FEATURES", default_level: Warn, desc: "unused features found in crate-level `#[feature]` directives", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::ENUM_GLOB_USE", default_level: Allow, desc: "use items that import all variants of an enum", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::NON_STD_LAZY_STATICS", default_level: Allow, desc: "lazy static that could be replaced by `std::sync::LazyLock`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::REST_PAT_IN_FULLY_BOUND_STRUCTS", default_level: Allow, desc: "a match on a struct that binds all fields but still uses the wildcard pattern", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::OR_FUN_CALL", default_level: Allow, desc: "using any `*or` method with a function call, which suggests `*or_else`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::FORMAT_PUSH_STRING", default_level: Allow, desc: "`format!(..)` appended to existing `String`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "KEYWORD_IDENTS_2018", default_level: Allow, desc: "detects edition keywords being used as an identifier", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: Some(FutureIncompatibleInfo { reference: "issue #49716 <https://github.com/rust-lang/rust/issues/49716>", reason: EditionError(Edition2018), explain_reason: true }), is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "UNUSED_CRATE_DEPENDENCIES", default_level: Allow, desc: "crate dependencies that are never used", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: true, eval_always: false } }, LintId { lint: Lint { name: "clippy::NEEDLESS_PASS_BY_VALUE", default_level: Allow, desc: "functions taking arguments by value, but not consuming them in its body", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::READ_ZERO_BYTE_VEC", default_level: Allow, desc: "checks for reads into a zero-length `Vec`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::USE_DEBUG", default_level: Allow, desc: "use of `Debug`-based formatting", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::NEGATIVE_FEATURE_NAMES", default_level: Allow, desc: "usage of a negative feature name", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::SAME_FUNCTIONS_IN_IF_CONDITION", default_level: Allow, desc: "consecutive `if`s with the same function call", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::INLINE_ASM_X86_ATT_SYNTAX", default_level: Allow, desc: "prefer Intel x86 assembly syntax", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::EXHAUSTIVE_ENUMS", default_level: Allow, desc: "detects exported enums that have not been marked #[non_exhaustive]", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::STRING_TO_STRING", default_level: Allow, desc: "using `to_string()` on a `String`, which should be `clone()`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "SUPERTRAIT_ITEM_SHADOWING_DEFINITION", default_level: Allow, desc: "detects when a supertrait item is shadowed by a subtrait item", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: Some("supertrait_item_shadowing"), crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "UNUSED_MUST_USE", default_level: Warn, desc: "unused result of a type flagged as `#[must_use]`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::LINKEDLIST", default_level: Allow, desc: "usage of LinkedList, usually a vector is faster, or a more specialized data structure like a `VecDeque`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::ITER_ON_EMPTY_COLLECTIONS", default_level: Allow, desc: "Iterator for empty array", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::ITER_FILTER_IS_OK", default_level: Allow, desc: "filtering an iterator over `Result`s for `Ok` can be achieved with `flatten`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MANUAL_MIDPOINT", default_level: Allow, desc: "manual implementation of `midpoint` which can overflow", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::EQUATABLE_IF_LET", default_level: Allow, desc: "using pattern matching instead of equality", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "MAP_UNIT_FN", default_level: Warn, desc: "`Iterator::map` call that discard the iterator's values", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::TOO_MANY_LINES", default_level: Allow, desc: "functions with too many lines", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::CHECKED_CONVERSIONS", default_level: Allow, desc: "`try_from` could replace manual bounds checking when casting", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::WILDCARD_ENUM_MATCH_ARM", default_level: Allow, desc: "a wildcard enum match arm using `_`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "UNREACHABLE_PUB", default_level: Allow, desc: "`pub` items not reachable from crate root", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::NEEDLESS_PASS_BY_REF_MUT", default_level: Allow, desc: "using a `&mut` argument when it's not mutated", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "RUST_2021_INCOMPATIBLE_OR_PATTERNS", default_level: Allow, desc: "detects usage of old versions of or-patterns", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: Some(FutureIncompatibleInfo { reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2021/or-patterns-macro-rules.html>", reason: EditionError(Edition2021), explain_reason: true }), is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "LET_UNDERSCORE_DROP", default_level: Allow, desc: "non-binding let on a type that has a destructor", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::LARGE_TYPES_PASSED_BY_VALUE", default_level: Allow, desc: "functions taking large arguments by value", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::IMPLICIT_HASHER", default_level: Allow, desc: "missing generalization over different hashers", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::ASSERTIONS_ON_RESULT_STATES", default_level: Allow, desc: "`assert!(r.is_ok())` or `assert!(r.is_err())` gives worse panic messages than directly calling `r.unwrap()` or `r.unwrap_err()`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::PATH_BUF_PUSH_OVERWRITE", default_level: Allow, desc: "calling `push` with file system root on `PathBuf` can overwrite it", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::UNWRAP_USED", default_level: Allow, desc: "using `.unwrap()` on `Result` or `Option`, which should at least get a better message using `expect()`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MANY_SINGLE_CHAR_NAMES", default_level: Allow, desc: "too many single character bindings", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::SINGLE_OPTION_MAP", default_level: Allow, desc: "Checks for functions with method calls to `.map(_)` on an arg of type `Option` as the outermost expression.", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "DEPRECATED_SAFE_2024", default_level: Allow, desc: "detects unsafe functions being used as safe functions", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: Some(FutureIncompatibleInfo { reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/newly-unsafe-functions.html>", reason: EditionError(Edition2024), explain_reason: true }), is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::ALLOC_INSTEAD_OF_CORE", default_level: Allow, desc: "type is imported from alloc when available in core", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::LET_UNDERSCORE_MUST_USE", default_level: Allow, desc: "non-binding `let` on a `#[must_use]` expression", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::IGNORED_UNIT_PATTERNS", default_level: Allow, desc: "suggest replacing `_` by `()` in patterns where appropriate", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::STRING_ADD", default_level: Allow, desc: "using `x + ..` where x is a `String` instead of `push_str()`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MIXED_READ_WRITE_IN_EXPRESSION", default_level: Allow, desc: "whether a variable read occurs before a write depends on sub-expression evaluation order", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::DBG_MACRO", default_level: Allow, desc: "`dbg!` macro is intended as a debugging tool", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MISSING_TRAIT_METHODS", default_level: Allow, desc: "trait implementation uses default provided method", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "EXPLICIT_OUTLIVES_REQUIREMENTS", default_level: Allow, desc: "outlives requirements can be inferred", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "DEAD_CODE", default_level: Warn, desc: "detect unused, unexported items", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "FFI_UNWIND_CALLS", default_level: Allow, desc: "call to foreign functions or function pointers with FFI-unwind ABI", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MAYBE_INFINITE_ITER", default_level: Allow, desc: "possible infinite iteration", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::SEPARATED_LITERAL_SUFFIX", default_level: Allow, desc: "literals whose suffix is separated by an underscore", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MULTIPLE_UNSAFE_OPS_PER_BLOCK", default_level: Allow, desc: "more than one unsafe operation per `unsafe` block", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::FLOAT_CMP_CONST", default_level: Allow, desc: "using `==` or `!=` on float constants instead of comparing difference with an allowed error", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::SUSPICIOUS_OPERATION_GROUPINGS", default_level: Allow, desc: "groupings of binary operations that look suspiciously like typos", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "CLOSURE_RETURNING_ASYNC_BLOCK", default_level: Allow, desc: "closure that returns `async {}` could be rewritten as an async closure", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "RUST_2024_INCOMPATIBLE_PAT", default_level: Allow, desc: "detects patterns whose meaning will change in Rust 2024", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: Some(FutureIncompatibleInfo { reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>", reason: EditionSemanticsChange(Edition2024), explain_reason: true }), is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::DOC_COMMENT_DOUBLE_SPACE_LINEBREAKS", default_level: Allow, desc: "double-space used for doc comment linebreak instead of `\\`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MUTEX_ATOMIC", default_level: Allow, desc: "using a mutex where an atomic value could be used instead.", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::UNIMPLEMENTED", default_level: Allow, desc: "`unimplemented!` should not be present in production code", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::SINGLE_CALL_FN", default_level: Allow, desc: "checks for functions that are only used once", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::TRANSMUTE_PTR_TO_PTR", default_level: Allow, desc: "transmutes from a pointer to a pointer / a reference to a reference", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::UNNECESSARY_SEMICOLON", default_level: Allow, desc: "unnecessary semicolon after expression returning `()`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MEM_FORGET", default_level: Allow, desc: "`mem::forget` usage on `Drop` types, likely to cause memory leaks", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::USE_SELF", default_level: Allow, desc: "unnecessary structure name repetition whereas `Self` is applicable", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::WILDCARD_IMPORTS", default_level: Allow, desc: "lint `use _::*` statements", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::DOC_MARKDOWN", default_level: Allow, desc: "presence of `_`, `::` or camel-case outside backticks in documentation", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "VARIANT_SIZE_DIFFERENCES", default_level: Allow, desc: "detects enums with widely varying variant sizes", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::DEREF_BY_SLICING", default_level: Allow, desc: "slicing instead of dereferencing", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::PARTIAL_PUB_FIELDS", default_level: Allow, desc: "partial fields of a struct are public", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MIN_IDENT_CHARS", default_level: Allow, desc: "disallows idents that are too short", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::NON_ZERO_SUGGESTIONS", default_level: Allow, desc: "suggests using `NonZero#` from `u#` or `i#` for more efficient and type-safe conversions", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::LARGE_FUTURES", default_level: Allow, desc: "large future may lead to unexpected stack overflows", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "KEYWORD_IDENTS_2024", default_level: Allow, desc: "detects edition keywords being used as an identifier", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: Some(FutureIncompatibleInfo { reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/gen-keyword.html>", reason: EditionError(Edition2024), explain_reason: true }), is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "PATH_STATEMENTS", default_level: Warn, desc: "path statements with no effect", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "NON_EXHAUSTIVE_OMITTED_PATTERNS", default_level: Allow, desc: "detect when patterns of types marked `non_exhaustive` are missed", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: Some("non_exhaustive_omitted_patterns_lint"), crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "UNUSED_QUALIFICATIONS", default_level: Allow, desc: "detects unnecessarily qualified names", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::UNINLINED_FORMAT_ARGS", default_level: Warn, desc: "using non-inlined variables in `format!` calls", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::IMPLICIT_RETURN", default_level: Allow, desc: "use a return statement like `return expr` instead of an expression", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::CAST_PRECISION_LOSS", default_level: Allow, desc: "casts that cause loss of precision, e.g., `x as f32` where `x: u64`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MULTIPLE_CRATE_VERSIONS", default_level: Allow, desc: "multiple versions of the same crate being used", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::EXHAUSTIVE_STRUCTS", default_level: Allow, desc: "detects exported structs that have not been marked #[non_exhaustive]", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MODULE_NAME_REPETITIONS", default_level: Allow, desc: "type names prefixed/postfixed with their containing module's name", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::INFINITE_LOOP", default_level: Allow, desc: "possibly unintended infinite loop", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::FILETYPE_IS_FILE", default_level: Allow, desc: "`FileType::is_file` is not recommended to test for readable file type", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::PANIC_IN_RESULT_FN", default_level: Allow, desc: "functions of type `Result<..>` that contain `panic!()` or assertion", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "UNUSED_RESULTS", default_level: Allow, desc: "unused result of an expression in a statement", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MISSING_DOCS_IN_PRIVATE_ITEMS", default_level: Allow, desc: "detects missing documentation for private members", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::PUB_USE", default_level: Allow, desc: "restricts the usage of `pub use`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::ALLOW_ATTRIBUTES_WITHOUT_REASON", default_level: Allow, desc: "ensures that all `allow` and `expect` attributes have a reason", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::REF_BINDING_TO_REFERENCE", default_level: Allow, desc: "`ref` binding to a reference", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::EXPL_IMPL_CLONE_ON_COPY", default_level: Allow, desc: "implementing `Clone` explicitly on `Copy` types", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::LARGE_STACK_FRAMES", default_level: Allow, desc: "checks for functions that allocate a lot of stack space", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::ITER_WITH_DRAIN", default_level: Allow, desc: "replace `.drain(..)` with `.into_iter()`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MANUAL_IS_VARIANT_AND", default_level: Allow, desc: "using `.map(f).unwrap_or_default()`, which is more succinctly expressed as `is_some_and(f)` or `is_ok_and(f)`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::NAIVE_BYTECOUNT", default_level: Allow, desc: "use of naive `<slice>.filter(|&x| x == y).count()` to count byte values", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "MULTIPLE_SUPERTRAIT_UPCASTABLE", default_level: Allow, desc: "detect when a dyn-compatible trait has multiple supertraits", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: Some("multiple_supertrait_upcastable"), crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MISSING_ASSERTS_FOR_INDEXING", default_level: Allow, desc: "indexing into a slice multiple times without an `assert`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::NO_MANGLE_WITH_RUST_ABI", default_level: Allow, desc: "convert Rust ABI functions to C ABI", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::PTR_AS_PTR", default_level: Allow, desc: "casting using `as` between raw pointers that doesn't change their constness, where `pointer::cast` could take the place of `as`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MATCH_WILDCARD_FOR_SINGLE_VARIANTS", default_level: Allow, desc: "a wildcard enum match for a single variant", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::FILTER_MAP_NEXT", default_level: Allow, desc: "using combination of `filter_map` and `next` which can usually be written as a single method call", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::IMPLICIT_CLONE", default_level: Allow, desc: "implicitly cloning a value by invoking a function on its dereferenced type", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::NON_SEND_FIELDS_IN_SEND_TY", default_level: Allow, desc: "there is a field that is not safe to be sent to another thread in a `Send` struct", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::REF_OPTION_REF", default_level: Allow, desc: "use `Option<&T>` instead of `&Option<&T>`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "UNUSED_IMPORTS", default_level: Warn, desc: "imports that are never used", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "ELIDED_LIFETIMES_IN_PATHS", default_level: Allow, desc: "hidden lifetime parameters in types are deprecated", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "RUST_2021_PRELUDE_COLLISIONS", default_level: Allow, desc: "detects the usage of trait methods which are ambiguous with traits added to the prelude in future editions", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: Some(FutureIncompatibleInfo { reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>", reason: EditionError(Edition2021), explain_reason: true }), is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::UNUSED_SELF", default_level: Allow, desc: "methods that contain a `self` argument but don't use it", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::UNNECESSARY_BOX_RETURNS", default_level: Allow, desc: "Needlessly returning a Box", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::UNUSED_TRAIT_NAMES", default_level: Allow, desc: "use items that import a trait but only use it anonymously", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::FUTURE_NOT_SEND", default_level: Allow, desc: "public Futures must be Send", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::USELESS_LET_IF_SEQ", default_level: Allow, desc: "unidiomatic `let mut` declaration followed by initialization in `if`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::STRING_LIT_AS_BYTES", default_level: Allow, desc: "calling `as_bytes` on a string literal instead of using a byte string literal", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::TRAILING_EMPTY_ARRAY", default_level: Allow, desc: "struct with a trailing zero-sized array but without `#[repr(C)]` or another `repr` attribute", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "MISSING_UNSAFE_ON_EXTERN", default_level: Allow, desc: "detects missing unsafe keyword on extern declarations", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: Some(FutureIncompatibleInfo { reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-extern.html>", reason: EditionError(Edition2024), explain_reason: true }), is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MISSING_CONST_FOR_FN", default_level: Allow, desc: "Lint functions definitions that could be made `const fn`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::UNNECESSARY_WRAPS", default_level: Allow, desc: "functions that only return `Ok` or `Some`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::REDUNDANT_ELSE", default_level: Allow, desc: "`else` branch that can be removed without changing semantics", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::INLINE_ALWAYS", default_level: Allow, desc: "use of `#[inline(always)]`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "UNUSED_ATTRIBUTES", default_level: Warn, desc: "detects attributes that were not used by the compiler", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "DEPRECATED_IN_FUTURE", default_level: Allow, desc: "detects use of items that will be deprecated in a future version", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "LINKER_MESSAGES", default_level: Allow, desc: "warnings emitted at runtime by the target-specific linker program", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::UNUSED_RESULT_OK", default_level: Allow, desc: "Use of `.ok()` to silence `Result`'s `#[must_use]` is misleading. Use `let _ =` instead.", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::CAST_PTR_ALIGNMENT", default_level: Allow, desc: "cast from a pointer to a more strictly aligned pointer", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::ITER_WITHOUT_INTO_ITER", default_level: Allow, desc: "implementing `iter(_mut)` without an associated `IntoIterator for (&|&mut) Type` impl", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MANUAL_INSTANT_ELAPSED", default_level: Allow, desc: "subtraction between `Instant::now()` and previous `Instant`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::IF_THEN_SOME_ELSE_NONE", default_level: Allow, desc: "Finds if-else that could be written using either `bool::then` or `bool::then_some`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MANUAL_STRING_NEW", default_level: Allow, desc: "empty String is being created manually", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MATCH_BOOL", default_level: Allow, desc: "a `match` on a boolean expression instead of an `if..else` block", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::FROM_ITER_INSTEAD_OF_COLLECT", default_level: Allow, desc: "use `.collect()` instead of `::from_iter()`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "UNUSED_DOC_COMMENTS", default_level: Warn, desc: "detects doc comments that aren't used by rustdoc", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::NEEDLESS_COLLECT", default_level: Allow, desc: "collecting an iterator when collect is not needed", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MUTEX_INTEGER", default_level: Allow, desc: "using a mutex for an integer type", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::TODO", default_level: Allow, desc: "`todo!` should not be present in production code", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::UNNECESSARY_SELF_IMPORTS", default_level: Allow, desc: "imports ending in `::{self}`, which can be omitted", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MOD_MODULE_FILES", default_level: Allow, desc: "checks that module layout is consistent", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::CLONED_INSTEAD_OF_COPIED", default_level: Allow, desc: "used `cloned` where `copied` could be used instead", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MAP_ERR_IGNORE", default_level: Allow, desc: "`map_err` should not ignore the original error", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::UNUSED_PEEKABLE", default_level: Allow, desc: "creating a peekable iterator without using any of its methods", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::DEFAULT_UNION_REPRESENTATION", default_level: Allow, desc: "unions without a `#[repr(C)]` attribute", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::DOC_LINK_CODE", default_level: Allow, desc: "link with code back-to-back with other code", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::STRUCT_EXCESSIVE_BOOLS", default_level: Allow, desc: "using too many bools in a struct", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::NON_ASCII_LITERAL", default_level: Allow, desc: "using any literal non-ASCII chars in a string literal instead of using the `\\u` escape", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::AS_UNDERSCORE", default_level: Allow, desc: "detects `as _` conversion", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::REF_PATTERNS", default_level: Allow, desc: "use of a ref pattern, e.g. Some(ref value)", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "UNUSED_PARENS", default_level: Warn, desc: "`if`, `match`, `while` and `return` do not need parentheses", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "UNUSED_LABELS", default_level: Warn, desc: "detects labels that are never used", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::UNNEEDED_FIELD_PATTERN", default_level: Allow, desc: "struct fields bound to a wildcard instead of using `..`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MANUAL_LET_ELSE", default_level: Allow, desc: "manual implementation of a let...else statement", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::WILDCARD_DEPENDENCIES", default_level: Allow, desc: "wildcard dependencies being used", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::CAST_SIGN_LOSS", default_level: Allow, desc: "casts from signed types to unsigned types, e.g., `x as u32` where `x: i32`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::BRANCHES_SHARING_CODE", default_level: Allow, desc: "`if` statement with shared code in all blocks", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::REDUNDANT_CLOSURE_FOR_METHOD_CALLS", default_level: Allow, desc: "redundant closures for method calls", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "MISSING_DOCS", default_level: Allow, desc: "detects missing documentation for public members", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::ZERO_SIZED_MAP_VALUES", default_level: Allow, desc: "usage of map with zero-sized value type", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "IF_LET_RESCOPE", default_level: Allow, desc: "`if let` assigns a shorter lifetime to temporary values being pattern-matched against in Edition 2024 and rewriting in `match` is an option to preserve the semantics up to Edition 2021", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: Some(FutureIncompatibleInfo { reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/temporary-if-let-scope.html>", reason: EditionSemanticsChange(Edition2024), explain_reason: true }), is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::UNWRAP_IN_RESULT", default_level: Allow, desc: "functions of type `Result<..>` or `Option`<...> that contain `expect()` or `unwrap()`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::HOST_ENDIAN_BYTES", default_level: Allow, desc: "disallows usage of the `to_ne_bytes` method", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::ALLOW_ATTRIBUTES", default_level: Allow, desc: "`#[allow]` will not trigger if a warning isn't found. `#[expect]` triggers if there are no warnings.", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::DEFAULT_NUMERIC_FALLBACK", default_level: Allow, desc: "usage of unconstrained numeric literals which may cause default numeric fallback.", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::UNSAFE_DERIVE_DESERIALIZE", default_level: Allow, desc: "deriving `serde::Deserialize` on a type that has methods using `unsafe`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::STR_SPLIT_AT_NEWLINE", default_level: Allow, desc: "splitting a trimmed string at hard-coded newlines", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::REDUNDANT_CLONE", default_level: Allow, desc: "`clone()` of an owned value that is going to be dropped immediately", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "UNUSED_MACROS", default_level: Warn, desc: "detects macros that were not used", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MISSING_FIELDS_IN_DEBUG", default_level: Allow, desc: "missing fields in manual `Debug` implementation", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "NON_ASCII_IDENTS", default_level: Allow, desc: "detects non-ASCII identifiers", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: true, eval_always: false } }, LintId { lint: Lint { name: "clippy::NEEDLESS_FOR_EACH", default_level: Allow, desc: "using `for_each` where a `for` loop would be simpler", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::REDUNDANT_PUB_CRATE", default_level: Allow, desc: "Using `pub(crate)` visibility on items that are not crate visible due to the visibility of the module that contains them.", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::SEMICOLON_INSIDE_BLOCK", default_level: Allow, desc: "add a semicolon inside the block", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::PTR_CAST_CONSTNESS", default_level: Allow, desc: "casting using `as` on raw pointers to change constness when specialized methods apply", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::SEMICOLON_IF_NOTHING_RETURNED", default_level: Allow, desc: "add a semicolon if nothing is returned", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::TUPLE_ARRAY_CONVERSIONS", default_level: Allow, desc: "checks for tuple<=>array conversions that are not done with `.into()`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::FALLIBLE_IMPL_FROM", default_level: Allow, desc: "Warn on impls of `From<..>` that contain `panic!()` or `unwrap()`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::PUB_WITH_SHORTHAND", default_level: Allow, desc: "disallows usage of `pub(<loc>)`, without `in`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "REDUNDANT_IMPORTS", default_level: Allow, desc: "imports that are redundant due to being imported already", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::BOOL_TO_INT_WITH_IF", default_level: Allow, desc: "using if to convert bool to int", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "RUST_2024_PRELUDE_COLLISIONS", default_level: Allow, desc: "detects the usage of trait methods which are ambiguous with traits added to the prelude in future editions", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: Some(FutureIncompatibleInfo { reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/prelude.html>", reason: EditionError(Edition2024), explain_reason: true }), is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::EXPECT_USED", default_level: Allow, desc: "using `.expect()` on `Result` or `Option`, which might be better handled", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::ITER_NOT_RETURNING_ITERATOR", default_level: Allow, desc: "methods named `iter` or `iter_mut` that do not return an `Iterator`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::QUESTION_MARK_USED", default_level: Allow, desc: "checks if the `?` operator is used", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::DOC_LINK_WITH_QUOTES", default_level: Allow, desc: "possible typo for an intra-doc link", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "UNSAFE_ATTR_OUTSIDE_UNSAFE", default_level: Allow, desc: "detects unsafe attributes outside of unsafe", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: Some(FutureIncompatibleInfo { reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-attributes.html>", reason: EditionError(Edition2024), explain_reason: true }), is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::INVALID_UPCAST_COMPARISONS", default_level: Allow, desc: "a comparison involving an upcast which is always true or false", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::STRING_SLICE", default_level: Allow, desc: "slicing a string", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::ELSE_IF_WITHOUT_ELSE", default_level: Allow, desc: "`if` expression with an `else if`, but without a final `else` branch", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::REF_AS_PTR", default_level: Allow, desc: "using `as` to cast a reference to pointer", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::COMPARISON_CHAIN", default_level: Allow, desc: "`if`s that can be rewritten with `match` and `cmp`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MODULO_ARITHMETIC", default_level: Allow, desc: "any modulo arithmetic statement", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::RETURN_SELF_NOT_MUST_USE", default_level: Allow, desc: "missing `#[must_use]` annotation on a method returning `Self`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "UNREACHABLE_CODE", default_level: Warn, desc: "detects unreachable code paths", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::UNUSED_ASYNC", default_level: Allow, desc: "finds async functions with no await statements", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "REDUNDANT_SEMICOLONS", default_level: Warn, desc: "detects unnecessary trailing semicolons", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::EMPTY_STRUCTS_WITH_BRACKETS", default_level: Allow, desc: "finds struct declarations with empty brackets", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::INTO_ITER_WITHOUT_ITER", default_level: Allow, desc: "implementing `IntoIterator for (&|&mut) Type` without an inherent `iter(_mut)` method", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "DEREF_INTO_DYN_SUPERTRAIT", default_level: Allow, desc: "`Deref` implementation with a supertrait trait object for output is shadowed by trait upcasting", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::UNCHECKED_DURATION_SUBTRACTION", default_level: Allow, desc: "finds unchecked subtraction of a 'Duration' from an 'Instant'", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::LITERAL_STRING_WITH_FORMATTING_ARGS", default_level: Allow, desc: "Checks if string literals have formatting arguments", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MANUAL_ASSERT", default_level: Allow, desc: "`panic!` and only a `panic!` in `if`-then statement", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "META_VARIABLE_MISUSE", default_level: Allow, desc: "possible meta-variable misuse at macro definition", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "RUST_2021_INCOMPATIBLE_CLOSURE_CAPTURES", default_level: Allow, desc: "detects closures affected by Rust 2021 changes", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: Some(FutureIncompatibleInfo { reference: "", reason: EditionSemanticsChange(Edition2021), explain_reason: false }), is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "SINGLE_USE_LIFETIMES", default_level: Allow, desc: "detects lifetime parameters that are only used once", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::UNREACHABLE", default_level: Allow, desc: "usage of the `unreachable!` macro", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::TRANSMUTE_UNDEFINED_REPR", default_level: Allow, desc: "transmute to or from a type with an undefined representation", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::SAME_NAME_METHOD", default_level: Allow, desc: "two method with same name", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::SELF_NAMED_MODULE_FILES", default_level: Allow, desc: "checks that module layout is consistent", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::SIGNIFICANT_DROP_TIGHTENING", default_level: Allow, desc: "Searches for elements marked with `#[clippy::has_significant_drop]` that could be early dropped but are in fact dropped at the end of their scopes", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MISMATCHING_TYPE_PARAM_ORDER", default_level: Allow, desc: "type parameter positioned inconsistently between type def and impl block", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "TRIVIAL_CASTS", default_level: Allow, desc: "detects trivial casts which could be removed", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::FN_PARAMS_EXCESSIVE_BOOLS", default_level: Allow, desc: "using too many bools in function parameters", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::UNICODE_NOT_NFC", default_level: Allow, desc: "using a Unicode literal not in NFC normal form (see [Unicode tr15](http://www.unicode.org/reports/tr15/) for further information)", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::AS_CONVERSIONS", default_level: Allow, desc: "using a potentially dangerous silent `as` conversion", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::COLLECTION_IS_NEVER_READ", default_level: Allow, desc: "a collection is never queried", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::BORROW_AS_PTR", default_level: Allow, desc: "borrowing just to cast to a raw pointer", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::IMPL_TRAIT_IN_PARAMS", default_level: Allow, desc: "`impl Trait` is used in the function's parameters", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MATCH_SAME_ARMS", default_level: Allow, desc: "`match` with identical arm bodies", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::FIELD_SCOPED_VISIBILITY_MODIFIERS", default_level: Allow, desc: "checks for usage of a scoped visibility modifier, like `pub(crate)`, on fields", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::INTEGER_DIVISION", default_level: Allow, desc: "integer division may cause loss of precision", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "INTERNAL_FEATURES", default_level: Warn, desc: "internal features are not supposed to be used", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "UNUSED_BRACES", default_level: Warn, desc: "unnecessary braces around an expression", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::OPTION_IF_LET_ELSE", default_level: Allow, desc: "reimplementation of Option::map_or", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::STRUCT_FIELD_NAMES", default_level: Allow, desc: "structs where all fields share a prefix/postfix or contain the name of the struct", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::CAST_POSSIBLE_TRUNCATION", default_level: Allow, desc: "casts that may cause truncation of the value, e.g., `x as u8` where `x: u32`, or `x as i32` where `x: f32`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::ITEMS_BEFORE_USE", default_level: Allow, desc: "default lint description", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::ELIDABLE_LIFETIME_NAMES", default_level: Allow, desc: "lifetime name that can be replaced with the anonymous lifetime", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MAP_UNWRAP_OR", default_level: Allow, desc: "using `.map(f).unwrap_or(a)` or `.map(f).unwrap_or_else(func)`, which are more succinctly expressed as `map_or(a, f)` or `map_or_else(a, f)`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::VERBOSE_FILE_READS", default_level: Allow, desc: "use of `File::read_to_end` or `File::read_to_string`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "MISSING_COPY_IMPLEMENTATIONS", default_level: Allow, desc: "detects potentially-forgotten implementations of `Copy`", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::LARGE_DIGIT_GROUPS", default_level: Allow, desc: "grouping digits into groups that are too large", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::TOO_LONG_FIRST_DOC_PARAGRAPH", default_level: Allow, desc: "ensure the first documentation paragraph is short", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "TAIL_EXPR_DROP_ORDER", default_level: Allow, desc: "Detect and warn on significant change in drop order in tail expression location", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: Some(FutureIncompatibleInfo { reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/temporary-tail-expr-scope.html>", reason: EditionSemanticsChange(Edition2024), explain_reason: true }), is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::ARITHMETIC_SIDE_EFFECTS", default_level: Allow, desc: "any arithmetic expression that can cause side effects like overflows or panics", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::PRECEDENCE_BITS", default_level: Allow, desc: "operations mixing bit shifting with bit combining/masking", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::RC_BUFFER", default_level: Allow, desc: "shared ownership of a buffer type", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::SHOULD_PANIC_WITHOUT_EXPECT", default_level: Allow, desc: "ensures that all `should_panic` attributes specify its expected panic message", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::LITTLE_ENDIAN_BYTES", default_level: Allow, desc: "disallows usage of the `to_le_bytes` method", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::DERIVE_PARTIAL_EQ_WITHOUT_EQ", default_level: Allow, desc: "deriving `PartialEq` on a type that can implement `Eq`, without implementing `Eq`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::CASE_SENSITIVE_FILE_EXTENSION_COMPARISONS", default_level: Allow, desc: "Checks for calls to ends_with with case-sensitive file extensions", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::GET_UNWRAP", default_level: Allow, desc: "using `.get().unwrap()` or `.get_mut().unwrap()` when using `[]` would work instead", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "UNUSED_MACRO_RULES", default_level: Allow, desc: "detects macro rules that were not used", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "FUZZY_PROVENANCE_CASTS", default_level: Allow, desc: "a fuzzy integer to pointer cast is used", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: Some("strict_provenance_lints"), crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "UNNAMEABLE_TYPES", default_level: Allow, desc: "effective visibility of a type is larger than the area in which it can be named", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::ITEMS_AFTER_STATEMENTS", default_level: Allow, desc: "blocks where an item comes after a statement", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::OPTION_AS_REF_CLONED", default_level: Allow, desc: "cloning an `Option` via `as_ref().cloned()`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::ARBITRARY_SOURCE_ITEM_ORDERING", default_level: Allow, desc: "arbitrary source item ordering", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::PATHBUF_INIT_THEN_PUSH", default_level: Allow, desc: "`push` immediately after `PathBuf` creation", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::SEMICOLON_OUTSIDE_BLOCK", default_level: Allow, desc: "add a semicolon outside the block", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::SHADOW_SAME", default_level: Allow, desc: "rebinding a name to itself, e.g., `let mut x = &mut x`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::STRING_LIT_CHARS_ANY", default_level: Allow, desc: "checks for `<string_lit>.chars().any(|i| i == c)`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::UNNECESSARY_LITERAL_BOUND", default_level: Allow, desc: "detects &str that could be &'static str in function return types", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::UNDOCUMENTED_UNSAFE_BLOCKS", default_level: Allow, desc: "creating an unsafe block without explaining why it is safe", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "MUST_NOT_SUSPEND", default_level: Allow, desc: "use of a `#[must_not_suspend]` value across a yield point", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: Some("must_not_suspend"), crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "RUST_2021_PREFIXES_INCOMPATIBLE_SYNTAX", default_level: Allow, desc: "identifiers that will be parsed as a prefix in Rust 2021", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: Some(FutureIncompatibleInfo { reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2021/reserving-syntax.html>", reason: EditionError(Edition2021), explain_reason: true }), is_externally_loaded: false, feature_gate: None, crate_level_only: true, eval_always: false } }, LintId { lint: Lint { name: "clippy::LARGE_INCLUDE_FILE", default_level: Allow, desc: "including a large file", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::UNUSED_ROUNDING", default_level: Allow, desc: "Uselessly rounding a whole number floating-point literal", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::PUB_WITHOUT_SHORTHAND", default_level: Allow, desc: "disallows usage of `pub(in <loc>)` with `in`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::PRINT_STDOUT", default_level: Allow, desc: "printing on stdout", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::CARGO_COMMON_METADATA", default_level: Allow, desc: "common metadata is defined in `Cargo.toml`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::STABLE_SORT_PRIMITIVE", default_level: Allow, desc: "use of sort() when sort_unstable() is equivalent", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::CREATE_DIR", default_level: Allow, desc: "calling `std::fs::create_dir` instead of `std::fs::create_dir_all`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::NONSTANDARD_MACRO_BRACES", default_level: Allow, desc: "check consistent use of braces in macro", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::LARGE_STACK_ARRAYS", default_level: Allow, desc: "allocating large arrays on stack may cause stack overflow", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::UNNECESSARY_SAFETY_DOC", default_level: Allow, desc: "`pub fn` or `pub trait` with `# Safety` docs", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::TESTS_OUTSIDE_TEST_MODULE", default_level: Allow, desc: "A test function is outside the testing module.", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "UNIT_BINDINGS", default_level: Allow, desc: "binding is useless because it has the unit `()` type", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::LET_UNDERSCORE_UNTYPED", default_level: Allow, desc: "non-binding `let` without a type annotation", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::SET_CONTAINS_OR_INSERT", default_level: Allow, desc: "call to `<set>::contains` followed by `<set>::insert`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::AS_POINTER_UNDERSCORE", default_level: Allow, desc: "detects `as *mut _` and `as *const _` conversion", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::DISALLOWED_SCRIPT_IDENTS", default_level: Allow, desc: "usage of non-allowed Unicode scripts", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::INDEX_REFUTABLE_SLICE", default_level: Allow, desc: "avoid indexing on slices which could be destructed", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::EXPLICIT_ITER_LOOP", default_level: Allow, desc: "for-looping over `_.iter()` or `_.iter_mut()` when `&_` or `&mut _` would do", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::SIGNIFICANT_DROP_IN_SCRUTINEE", default_level: Allow, desc: "warns when a temporary of a type with a drop with a significant side-effect might have a surprising lifetime", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::NEEDLESS_BITWISE_BOOL", default_level: Allow, desc: "Boolean expressions that use bitwise rather than lazy operators", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "UNREACHABLE_PATTERNS", default_level: Warn, desc: "detects unreachable patterns", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::RANGE_PLUS_ONE", default_level: Allow, desc: "`x..(y+1)` reads better as `x..=y`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::EMPTY_ENUM_VARIANTS_WITH_BRACKETS", default_level: Allow, desc: "finds enum variants with empty brackets", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::REDUNDANT_TYPE_ANNOTATIONS", default_level: Allow, desc: "warns about needless / redundant type annotations.", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MATCH_WILD_ERR_ARM", default_level: Allow, desc: "a `match` with `Err(_)` arm and take drastic actions", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::IF_NOT_ELSE", default_level: Allow, desc: "`if` branches that could be swapped so no negation operation is necessary on the condition", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::CLEAR_WITH_DRAIN", default_level: Allow, desc: "calling `drain` in order to `clear` a container", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "UNSTABLE_FEATURES", default_level: Allow, desc: "enabling unstable features", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "UNUSED_LIFETIMES", default_level: Allow, desc: "detects lifetime parameters that are never used", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::USED_UNDERSCORE_BINDING", default_level: Allow, desc: "using a binding which is prefixed with an underscore", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::NO_EFFECT_UNDERSCORE_BINDING", default_level: Allow, desc: "binding to `_` prefixed variable with no side-effect", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::VERBOSE_BIT_MASK", default_level: Allow, desc: "expressions where a bit mask is less readable than the corresponding method call", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::NEEDLESS_RAW_STRINGS", default_level: Allow, desc: "suggests using a string literal when a raw string literal is unnecessary", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::WHILE_FLOAT", default_level: Allow, desc: "while loops comparing floating point values", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::STD_INSTEAD_OF_CORE", default_level: Allow, desc: "type is imported from std when available in core", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::EMPTY_DROP", default_level: Allow, desc: "empty `Drop` implementations", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "TRIVIAL_NUMERIC_CASTS", default_level: Allow, desc: "detects trivial casts of numeric types which could be removed", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MISSING_ERRORS_DOC", default_level: Allow, desc: "`pub fn` returns `Result` without `# Errors` in doc comment", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MULTIPLE_INHERENT_IMPL", default_level: Allow, desc: "Multiple inherent impl that could be grouped", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::RENAMED_FUNCTION_PARAMS", default_level: Allow, desc: "renamed function parameters in trait implementation", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::CLONE_ON_REF_PTR", default_level: Allow, desc: "using `clone` on a ref-counted pointer", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::ERROR_IMPL_ERROR", default_level: Allow, desc: "exported types named `Error` that implement `Error`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "UNUSED_IMPORT_BRACES", default_level: Allow, desc: "unnecessary braces around an imported item", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "UNUSED_VARIABLES", default_level: Warn, desc: "detect variables which are not used in any way", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "MACRO_USE_EXTERN_CRATE", default_level: Allow, desc: "the `#[macro_use]` attribute is now deprecated in favor of using macros via the module system", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::IMPRECISE_FLOPS", default_level: Allow, desc: "usage of imprecise floating point operations", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::UNNECESSARY_JOIN", default_level: Allow, desc: "using `.collect::<Vec<String>>().join(\"\")` on an iterator", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::PUB_UNDERSCORE_FIELDS", default_level: Allow, desc: "struct field prefixed with underscore and marked public", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::NEEDLESS_CONTINUE", default_level: Allow, desc: "`continue` statements that can be replaced by a rearrangement of code", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::CAST_POSSIBLE_WRAP", default_level: Allow, desc: "casts that may cause wrapping around the value, e.g., `x as i32` where `x: u32` and `x > i32::MAX`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::COPY_ITERATOR", default_level: Allow, desc: "implementing `Iterator` on a `Copy` type", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MISSING_ASSERT_MESSAGE", default_level: Allow, desc: "checks assertions without a custom panic message", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::INDEXING_SLICING", default_level: Allow, desc: "indexing/slicing usage", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::RETURN_AND_THEN", default_level: Allow, desc: "using `Option::and_then` or `Result::and_then` to chain a computation that returns an `Option` or a `Result`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "MISSING_DEBUG_IMPLEMENTATIONS", default_level: Allow, desc: "detects missing implementations of Debug", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::FLOAT_ARITHMETIC", default_level: Allow, desc: "any floating-point arithmetic statement", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "UNUSED_UNSAFE", default_level: Warn, desc: "unnecessary use of an `unsafe` block", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "RUST_2024_GUARDED_STRING_INCOMPATIBLE_SYNTAX", default_level: Allow, desc: "will be parsed as a guarded string in Rust 2024", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: Some(FutureIncompatibleInfo { reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/reserved-syntax.html>", reason: EditionError(Edition2024), explain_reason: true }), is_externally_loaded: false, feature_gate: None, crate_level_only: true, eval_always: false } }, LintId { lint: Lint { name: "clippy::ABSOLUTE_PATHS", default_level: Allow, desc: "checks for usage of an item without a `use` statement", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "IMPL_TRAIT_OVERCAPTURES", default_level: Allow, desc: "`impl Trait` will capture more lifetimes than possibly intended in edition 2024", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: Some(FutureIncompatibleInfo { reference: "<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/rpit-lifetime-capture.html>", reason: EditionSemanticsChange(Edition2024), explain_reason: true }), is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::DOC_INCLUDE_WITHOUT_CFG", default_level: Allow, desc: "check if files included in documentation are behind `cfg(doc)`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::DECIMAL_LITERAL_REPRESENTATION", default_level: Allow, desc: "using decimal representation when hexadecimal would be better", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::BIG_ENDIAN_BYTES", default_level: Allow, desc: "disallows usage of the `to_be_bytes` method", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::REDUNDANT_TEST_PREFIX", default_level: Allow, desc: "redundant `test_` prefix in test function name", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::LOSSY_FLOAT_LITERAL", default_level: Allow, desc: "lossy whole number float literals", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::TRIVIAL_REGEX", default_level: Allow, desc: "trivial regular expressions", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::SHADOW_REUSE", default_level: Allow, desc: "rebinding a name to an expression that reuses the original value, e.g., `let x = x + 1`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::SINGLE_CHAR_LIFETIME_NAMES", default_level: Allow, desc: "warns against single-character lifetime names", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "LOSSY_PROVENANCE_CASTS", default_level: Allow, desc: "a lossy pointer to integer cast is used", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: Some("strict_provenance_lints"), crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::TYPE_REPETITION_IN_BOUNDS", default_level: Allow, desc: "types are repeated unnecessarily in trait bounds, use `+` instead of using `T: _, T: _`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::UNNESTED_OR_PATTERNS", default_level: Allow, desc: "unnested or-patterns, e.g., `Foo(Bar) | Foo(Baz) instead of `Foo(Bar | Baz)`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MUST_USE_CANDIDATE", default_level: Allow, desc: "function or method that could take a `#[must_use]` attribute", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::FORMAT_COLLECT", default_level: Allow, desc: "`format!`ing every element in a collection, then collecting the strings into a new `String`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "UNUSED_EXTERN_CRATES", default_level: Allow, desc: "extern crates that are never used", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "ABSOLUTE_PATHS_NOT_STARTING_WITH_CRATE", default_level: Allow, desc: "fully qualified paths that start with a module name instead of `crate`, `self`, or an extern crate name", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: Some(FutureIncompatibleInfo { reference: "issue #53130 <https://github.com/rust-lang/rust/issues/53130>", reason: EditionError(Edition2018), explain_reason: true }), is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::UNNECESSARY_DEBUG_FORMATTING", default_level: Allow, desc: "`Debug` formatting applied to an `OsStr` or `Path` when `.display()` is available", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MUT_MUT", default_level: Allow, desc: "usage of double-mut refs, e.g., `&mut &mut ...`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::UNNECESSARY_SAFETY_COMMENT", default_level: Allow, desc: "annotating safe code with a safety comment", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::PRINT_STDERR", default_level: Allow, desc: "printing on stderr", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::REDUNDANT_FEATURE_NAMES", default_level: Allow, desc: "usage of a redundant feature name", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::INLINE_ASM_X86_INTEL_SYNTAX", default_level: Allow, desc: "prefer AT&T x86 assembly syntax", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MAP_WITH_UNUSED_ARGUMENT_OVER_RANGES", default_level: Allow, desc: "map of a trivial closure (not dependent on parameter) over a range", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MACRO_USE_IMPORTS", default_level: Allow, desc: "#[macro_use] is no longer needed", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::UNREADABLE_LITERAL", default_level: Allow, desc: "long literal without underscores", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::STR_TO_STRING", default_level: Allow, desc: "using `to_string()` on a `&str`, which should be `to_owned()`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "SUPERTRAIT_ITEM_SHADOWING_USAGE", default_level: Allow, desc: "detects when a supertrait item is shadowed by a subtrait item", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: Some("supertrait_item_shadowing"), crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "UNQUALIFIED_LOCAL_IMPORTS", default_level: Allow, desc: "`use` of a local item without leading `self::`, `super::`, or `crate::`", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: Some("unqualified_local_imports"), crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::OPTION_OPTION", default_level: Allow, desc: "usage of `Option<Option<T>>`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::SUSPICIOUS_XOR_USED_AS_POW", default_level: Allow, desc: "XOR (`^`) operator possibly used as exponentiation operator", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::EXPLICIT_INTO_ITER_LOOP", default_level: Allow, desc: "for-looping over `_.into_iter()` when `_` would do", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::EXPLICIT_DEREF_METHODS", default_level: Allow, desc: "Explicit use of deref or deref_mut method while not in a method chain.", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::TRY_ERR", default_level: Allow, desc: "return errors explicitly rather than hiding them behind a `?`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::ITER_FILTER_IS_SOME", default_level: Allow, desc: "filtering an iterator over `Option`s for `Some` can be achieved with `flatten`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::ASSIGNING_CLONES", default_level: Allow, desc: "assigning the result of cloning may be inefficient", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::CFG_NOT_TEST", default_level: Allow, desc: "enforce against excluding code from test builds", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::ITER_ON_SINGLE_ITEMS", default_level: Allow, desc: "Iterator for array of length 1", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "EDITION_2024_EXPR_FRAGMENT_SPECIFIER", default_level: Allow, desc: "The `expr` fragment specifier will accept more expressions in the 2024 edition. To keep the existing behavior, use the `expr_2021` fragment specifier.", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: Some(FutureIncompatibleInfo { reference: "Migration Guide <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/macro-fragment-specifiers.html>", reason: EditionSemanticsChange(Edition2024), explain_reason: true }), is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::RANGE_MINUS_ONE", default_level: Allow, desc: "`x..=(y-1)` reads better as `x..y`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::FN_TO_NUMERIC_CAST_ANY", default_level: Allow, desc: "casting a function pointer to any integer type", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::DEFAULT_TRAIT_ACCESS", default_level: Allow, desc: "checks for literal calls to `Default::default()`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MISSING_INLINE_IN_PUBLIC_ITEMS", default_level: Allow, desc: "detects missing `#[inline]` attribute for public callables (functions, trait methods, methods...)", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::USED_UNDERSCORE_ITEMS", default_level: Allow, desc: "using a item which is prefixed with an underscore", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "REDUNDANT_LIFETIMES", default_level: Allow, desc: "detects lifetime parameters that are redundant because they are equal to some other named lifetime", edition_lint_opts: None, report_in_external_macro: false, future_incompatible: None, is_externally_loaded: false, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::DEBUG_ASSERT_WITH_MUT_CALL", default_level: Allow, desc: "mutable arguments in `debug_assert{,_ne,_eq}!`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::NEEDLESS_RAW_STRING_HASHES", default_level: Allow, desc: "suggests reducing the number of hashes around a raw string literal", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::TRIVIALLY_COPY_PASS_BY_REF", default_level: Allow, desc: "functions taking small copyable arguments by reference", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::IGNORE_WITHOUT_REASON", default_level: Allow, desc: "ignored tests without messages", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::FLAT_MAP_OPTION", default_level: Allow, desc: "used `flat_map` where `filter_map` could be used instead", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::STD_INSTEAD_OF_ALLOC", default_level: Allow, desc: "type is imported from std when available in alloc", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::SIMILAR_NAMES", default_level: Allow, desc: "similarly named items and bindings", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::INTEGER_DIVISION_REMAINDER_USED", default_level: Allow, desc: "use of disallowed default division and remainder operations", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::MISSING_PANICS_DOC", default_level: Allow, desc: "`pub fn` may panic without `# Panics` in doc comment", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::STRING_ADD_ASSIGN", default_level: Allow, desc: "using `x = x + ..` where x is a `String` instead of `push_str()`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::INCONSISTENT_STRUCT_CONSTRUCTOR", default_level: Allow, desc: "the order of the field init is inconsistent with the order in the struct definition", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::REF_OPTION", default_level: Allow, desc: "function signature uses `&Option<T>` instead of `Option<&T>`", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }, LintId { lint: Lint { name: "clippy::AS_PTR_CAST_MUT", default_level: Allow, desc: "casting the result of the `&self`-taking `as_ptr` to a mutable pointer", edition_lint_opts: None, report_in_external_macro: true, future_incompatible: None, is_externally_loaded: true, feature_gate: None, crate_level_only: false, eval_always: false } }} }
stack backtrace:
   0:     0x7f1dad758c93 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h2f02338d4ae6d8b0
   1:     0x7f1dade05987 - core::fmt::write::h5e77c22335cabc7f
   2:     0x7f1daeebf611 - std::io::Write::write_fmt::hccf7b69d0b3d44cc
   3:     0x7f1dad758af2 - std::sys::backtrace::BacktraceLock::print::hb22254026b13323e
   4:     0x7f1dad75c6ea - std::panicking::default_hook::{{closure}}::h15ac4e3ee7801be5
   5:     0x7f1dad75c26f - std::panicking::default_hook::h15db2a3343942a16
   6:     0x7f1dac78ba03 - std[7cad246a9e76d988]::panicking::update_hook::<alloc[7a88f824ccc9bf63]::boxed::Box<rustc_driver_impl[817478e824aa827]::install_ice_hook::{closure#1}>>::{closure#0}
   7:     0x7f1dad75cf63 - std::panicking::rust_panic_with_hook::h67f3fa85499b6cf9
   8:     0x7f1dad75cc5a - std::panicking::begin_panic_handler::{{closure}}::h40a30e994b26720e
   9:     0x7f1dad759169 - std::sys::backtrace::__rust_end_short_backtrace::hb5bcb2f6ea295c8b
  10:     0x7f1dad75c91d - __rustc[bf3627c2b8b7eae9]::rust_begin_unwind
  11:     0x7f1daa0874e0 - core::panicking::panic_fmt::h20722ae9d0312a90
  12:     0x7f1dacda6579 - rustc_query_system[341f49cf1150f7a3]::query::plumbing::incremental_verify_ich_failed::<rustc_middle[8f648b1898e8f992]::ty::context::TyCtxt>
  13:     0x7f1daec435d7 - rustc_query_system[341f49cf1150f7a3]::query::plumbing::incremental_verify_ich::<rustc_middle[8f648b1898e8f992]::ty::context::TyCtxt, rustc_middle[8f648b1898e8f992]::query::erase::Erased<[u8; 8usize]>>
  14:     0x7f1daed10692 - rustc_query_system[341f49cf1150f7a3]::query::plumbing::try_execute_query::<rustc_query_impl[c116a7b28af8393]::DynamicConfig<rustc_query_system[341f49cf1150f7a3]::query::caches::SingleCache<rustc_middle[8f648b1898e8f992]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[c116a7b28af8393]::plumbing::QueryCtxt, true>
  15:     0x7f1daf219af1 - rustc_query_impl[c116a7b28af8393]::query_impl::lints_that_dont_need_to_run::get_query_incr::__rust_end_short_backtrace
  16:     0x7f1daedad365 - rustc_lint[1b5bb4c8a5faf0b4]::late::check_crate::{closure#0}
  17:     0x7f1daedad889 - rustc_lint[1b5bb4c8a5faf0b4]::late::check_crate
  18:     0x7f1daedabb9f - rustc_interface[2a1066e4df123d40]::passes::analysis
  19:     0x7f1daedab975 - rustc_query_impl[c116a7b28af8393]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[c116a7b28af8393]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[8f648b1898e8f992]::query::erase::Erased<[u8; 0usize]>>
  20:     0x7f1daeda6584 - rustc_query_system[341f49cf1150f7a3]::query::plumbing::try_execute_query::<rustc_query_impl[c116a7b28af8393]::DynamicConfig<rustc_query_system[341f49cf1150f7a3]::query::caches::SingleCache<rustc_middle[8f648b1898e8f992]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[c116a7b28af8393]::plumbing::QueryCtxt, true>
  21:     0x7f1daeda5ea8 - rustc_query_impl[c116a7b28af8393]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
  22:     0x7f1daf0149c7 - rustc_interface[2a1066e4df123d40]::passes::create_and_enter_global_ctxt::<core[ee896a018689144d]::option::Option<rustc_interface[2a1066e4df123d40]::queries::Linker>, rustc_driver_impl[817478e824aa827]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
  23:     0x7f1daef01ea6 - rustc_interface[2a1066e4df123d40]::interface::run_compiler::<(), rustc_driver_impl[817478e824aa827]::run_compiler::{closure#0}>::{closure#1}
  24:     0x7f1daeeb62be - std[7cad246a9e76d988]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[2a1066e4df123d40]::util::run_in_thread_with_globals<rustc_interface[2a1066e4df123d40]::util::run_in_thread_pool_with_globals<rustc_interface[2a1066e4df123d40]::interface::run_compiler<(), rustc_driver_impl[817478e824aa827]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  25:     0x7f1daeeb672b - <<std[7cad246a9e76d988]::thread::Builder>::spawn_unchecked_<rustc_interface[2a1066e4df123d40]::util::run_in_thread_with_globals<rustc_interface[2a1066e4df123d40]::util::run_in_thread_pool_with_globals<rustc_interface[2a1066e4df123d40]::interface::run_compiler<(), rustc_driver_impl[817478e824aa827]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[ee896a018689144d]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  26:     0x7f1daeeb7b2b - std::sys::pal::unix::thread::Thread::new::thread_start::h211a36f354245501
  27:     0x7f1da8c787eb - <unknown>
  28:     0x7f1da8cfc18c - <unknown>
  29:                0x0 - <unknown>

error: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new?template=ice.yml

note: please make sure that you have updated to the latest nightly

note: rustc 1.89.0-nightly (414482f6a 2025-05-13) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z ui-testing -Z deduplicate-diagnostics=no -C incremental=[REDACTED]

query stack during panic:
#0 [lints_that_dont_need_to_run] Computing all lints that are explicitly enabled or with a default level greater than Allow
#1 [analysis] running analysis passes on this crate
end of query stack
note: Clippy version: clippy 0.1.89 (d44e35d595 2025-05-19)

error: aborting due to 1 previous error


full stdout:


FAILURES:
    tests/ui/items_before_use.rs
    tests/ui/to_string_in_format_args_incremental.fixed

test result: FAIL. 2 failed; 1618 passed; 5 ignored

@flip1995
Copy link
Member

Also huh, the test still exists in the clippy repo

If you sync with subtree and in one direction you do not include the file deletion, but in the other direction you do in one sync, then git will remember that and always keep it like this. josh is more consistent/intuitive/(?) there.

@Alexendoo
Copy link
Member

Thanks @utkrsharmaa!

@blyxyas looks like this is down to the lints_that_dont_need_to_run query, if the number/names/etc of registered lints change between runs the hash won't match as the lint store is untracked state in the query system

The query could be made eval_always directly or indirectly to track that state, but this is only relevant for clippy in development so we could work around it on our side to avoid any overhead for released rustc/clippy. That said cc @smoelius does dylint run into this?

@blyxyas
Copy link
Member

blyxyas commented May 27, 2025

I'd say that it's preferable to instruct contributors to do a cargo clean if they see that error, remove the test, or do some special casing for the Clippy codebase, than making it eval_always.

Does the query system re-eval queries if the compiler version changes?

@smoelius
Copy link
Contributor

smoelius commented May 27, 2025

That said cc @smoelius does dylint run into this?

Not exactly, but Dylint leans on Cargo more. Before running lints from a library, Dylint runs cargo fetch on each of the libraries's sources and then tries to rebuild the library. So Dylint always uses the most up-to-date (though possibly rebuilt) version of a library. (Please let me know if I've misunderstood your question.)

@samueltardieu
Copy link
Contributor

I'd say that it's preferable to instruct contributors to do a cargo clean if they see that error, remove the test, or do some special casing for the Clippy codebase, than making it eval_always.

This one makes me lose a lot of time and CPU resources by forcing me to run cargo clean almost everytime I switch branches to work on or review lints, forcing a full rebuild, including a rebuild of dev even if it hasn't changed between branches, etc.

@Alexendoo
Copy link
Member

Does the query system re-eval queries if the compiler version changes?

It starts fresh, the filename hash would change so the same crate would have two entries in target/debug/deps, target/debug/incremental, etc

Not exactly, but Dylint leans on Cargo more. Before running lints from a library, Dylint runs cargo fetch on each of the libraries's sources and then tries to rebuild the library. So Dylint always uses the most up-to-date (though possibly rebuilt) version of a library. (Please let me know if I've misunderstood your question.)

The situation I was thinking of is:

  1. Run dylint on a codebase
  2. Run it again with another lint added

But I haven't looked into how it works exactly, I'm assuming it has incremental enabled and that both runs would have the same rustc hash

@smoelius
Copy link
Contributor

The situation I was thinking of is:

  1. Run dylint on a codebase
  2. Run it again with another lint added

But I haven't looked into how it works exactly, I'm assuming it has incremental enabled and that both runs would have the same rustc hash

Yes, re incremental and same rustc hash.

One normally runs Dylint by adding something like the following the Cargo.toml file:

[workspace.metadata.dylint]
libraries = [
    { git = "https://github.com/trailofbits/dylint", pattern = "examples/general" },
]

In that sense, there are two ways to interpret "run it again with another lint added".

One is to add another lint to a library already in use, e.g., examples/general above. In that case, the mechanism I described in #11126 (comment) would cause the lints to be re-run.

The second is to add another library, e.g.:

[workspace.metadata.dylint]
libraries = [
    { git = "https://github.com/trailofbits/dylint", pattern = "examples/general" },
    { git = "https://github.com/trailofbits/dylint", pattern = "examples/restriction/try_io_result" },
]

In that case, the lints would be re-run because which lints are run is recorded in env_depinfo. (This was a bug a few years ago.)

@Alexendoo
Copy link
Member

It'd be worth testing to see if that ICEs assuming it's using a relatively recent rust version, it also requires that the added lint is warn by default or #![warn/deny]d somewhere

It's a separate issue from rerun detection, the ICE happens when the first run's lints_that_dont_need_to_run fingerprint is different from the second but the node isn't marked red (so make sure the file being linted is unchanged between runs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants