Closed
Description
E.g., while this compiles:
library;
fn fun() {
struct S {
field: u8,
}
const CONST: u8 = 0;
}
trying to attribute or comment nested items will result in "Expected an expression." error on every doc comment or attribute:
library;
fn fun() {
/// Comment. // <<<--- ERROR: Expected an expression.
#[allow(dead_code)] // <<<--- ERROR: Expected an expression.
struct S {
/// Comment. // <<<--- ERROR: Expected an expression.
#[allow(dead_code)] // <<<--- ERROR: Expected an expression.
field: u8,
}
/// Comment. // <<<--- ERROR: Expected an expression.
#[allow(dead_code)] // <<<--- ERROR: Expected an expression.
const CONST: u8 = 0;
}