Auto merge of #12322 - sanxiyn:expression-with-attribute, r=llogiq

Be careful with expressions with attributes

Fix #9949.

changelog: [`unused_unit`]: skip expressions with attributes
This commit is contained in:
bors
2024-02-24 10:52:55 +00:00
3 changed files with 15 additions and 0 deletions
+7
View File
@@ -94,3 +94,10 @@ mod issue9748 {
let _ = for<'a> |_: &'a u32| -> () {};
}
}
mod issue9949 {
fn main() {
#[doc = "documentation"]
()
}
}
+7
View File
@@ -94,3 +94,10 @@ fn main() {
let _ = for<'a> |_: &'a u32| -> () {};
}
}
mod issue9949 {
fn main() {
#[doc = "documentation"]
()
}
}