- Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't have
Description
Summary
I want to silence a clippy warning.
I did stick the allow to all places I thought possible.
It is silenced without the derive.
Lint Name
type_complexity
Reproducer
I tried this code:
use std::borrow::Cow; #[derive(serde::Serialize, serde::Deserialize)] pub enum EncounterType {} #[allow(clippy::type_complexity)] #[derive(serde::Serialize, serde::Deserialize)] #[allow(clippy::type_complexity)] pub struct SerdeEncounter<'a>( #[allow(clippy::type_complexity)] Vec<(Cow<'a, str>, Vec<EncounterType>, usize, Cow<'a, str>)>, );
I saw this happen:
warning: very complex type used. Consider factoring parts into `type` definitions --> app/src/lib.rs:99:39 | 99 | #[allow(clippy::type_complexity)] Vec<(Cow<'a, str>, Vec<EncounterType>, usize, Cow<'a, str>)>, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
I expected to see this happen:
Nothing
Version
tested on play.rust-lang.org, which reports: stable rust 1.68.1 clippy 0.1.70 (2023-03-26 db0cbc4)
Additional Labels
No response
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't have