From 4547b622d8d29df964fa2914213088b148c498fc Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:18:32 +0200 Subject: Merging upstream version 1.67.1+dfsg1. Signed-off-by: Daniel Baumann --- src/tools/clippy/tests/ui/cognitive_complexity.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/tools/clippy/tests/ui/cognitive_complexity.rs') 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 {} + } + } +} -- cgit v1.2.3