Skip to content

Commit bf34e16

Browse files
authored
Unrolled build for #155829
Rollup merge of #155829 - scrabsha:push-kwlqypwmnpul, r=mejrs rustc_attr_parsing: use a `try {}` in `or_malformed`
2 parents ca9a134 + a7330f4 commit bf34e16

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

  • compiler/rustc_attr_parsing/src/attributes/diagnostic

compiler/rustc_attr_parsing/src/attributes/diagnostic/mod.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,11 @@ fn parse_directive_items<'p, S: Stage>(
236236
}}
237237

238238
macro or_malformed($($code:tt)*) {{
239-
let Some(ret) = (||{
240-
Some($($code)*)
241-
})() else {
239+
let Some(ret) = (
240+
try {
241+
$($code)*
242+
}
243+
) else {
242244
malformed!()
243245
};
244246
ret

0 commit comments

Comments
 (0)