Skip to content

Commit 310df0c

Browse files
committed
Parse outer attrs on ExprBlock
1 parent ee66f12 commit 310df0c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/expr.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2614,6 +2614,7 @@ pub(crate) mod parsing {
26142614
#[cfg_attr(doc_cfg, doc(cfg(feature = "parsing")))]
26152615
impl Parse for ExprBlock {
26162616
fn parse(input: ParseStream) -> Result<Self> {
2617+
let outer_attrs = input.call(Attribute::parse_outer)?;
26172618
let label: Option<Label> = input.parse()?;
26182619

26192620
let content;
@@ -2622,7 +2623,7 @@ pub(crate) mod parsing {
26222623
let stmts = content.call(Block::parse_within)?;
26232624

26242625
Ok(ExprBlock {
2625-
attrs: inner_attrs,
2626+
attrs: private::attrs(outer_attrs, inner_attrs),
26262627
label,
26272628
block: Block { brace_token, stmts },
26282629
})

0 commit comments

Comments
 (0)