diff options
Diffstat (limited to 'src/tools/clippy/tests/ui/cognitive_complexity.rs')
-rw-r--r-- | src/tools/clippy/tests/ui/cognitive_complexity.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/cognitive_complexity.rs b/src/tools/clippy/tests/ui/cognitive_complexity.rs index 912e6788a..07bdaff00 100644 --- a/src/tools/clippy/tests/ui/cognitive_complexity.rs +++ b/src/tools/clippy/tests/ui/cognitive_complexity.rs @@ -393,3 +393,19 @@ impl Moo { } } } + +#[clippy::cognitive_complexity = "1"] +mod issue9300 { + async fn a() { + let a = 0; + if a == 0 {} + } + + pub struct S; + impl S { + pub async fn async_method() { + let a = 0; + if a == 0 {} + } + } +} |