Closed
Description
rust-analyzer version: 0.4.1436-standalone
rustc version: rustc 1.70.0-nightly (8a73f50d8 2023-03-11)
relevant settings: N/A
rust-analyzer triggers a missing-unsafe
lint false positive when in an if
condition expression and preceded by an attribute
Example:
unsafe fn unsafe_fn() -> bool {
false
}
fn main() -> Result<()> {
#[allow(unused)] // any attr
if unsafe { unsafe_fn() } {}
// ^ rust-analyzer(missing-unsafe)
}