mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
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:
@@ -94,3 +94,10 @@ mod issue9748 {
|
||||
let _ = for<'a> |_: &'a u32| -> () {};
|
||||
}
|
||||
}
|
||||
|
||||
mod issue9949 {
|
||||
fn main() {
|
||||
#[doc = "documentation"]
|
||||
()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,3 +94,10 @@ fn main() {
|
||||
let _ = for<'a> |_: &'a u32| -> () {};
|
||||
}
|
||||
}
|
||||
|
||||
mod issue9949 {
|
||||
fn main() {
|
||||
#[doc = "documentation"]
|
||||
()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user