5f89a60f1a
closes #8541
25 lines
764 B
Rust
25 lines
764 B
Rust
fn inner() {
|
|
#![doc("Inner attributes allowed here")]
|
|
//! As are ModuleDoc style comments
|
|
{
|
|
#![doc("Inner attributes are allowed in blocks used as statements")]
|
|
#![doc("Being validated is not affected by duplcates")]
|
|
//! As are ModuleDoc style comments
|
|
};
|
|
{
|
|
#![doc("Inner attributes are allowed in blocks when they are the last statement of another block")]
|
|
//! As are ModuleDoc style comments
|
|
}
|
|
}
|
|
|
|
fn outer() {
|
|
let _ = #[doc("Outer attributes are always allowed")] {};
|
|
}
|
|
|
|
// https://github.com/rust-analyzer/rust-analyzer/issues/689
|
|
impl Whatever {
|
|
fn salsa_event(&self, event_fn: impl Fn() -> Event<Self>) {
|
|
#![allow(unused_variables)] // this is `inner_attr` of the block
|
|
}
|
|
}
|