Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 2f305ff

Browse files
committed
Remove an unnecessary ?.
1 parent f8e4ac0 commit 2f305ff

File tree

1 file changed

+4
-8
lines changed
  • compiler/rustc_parse/src/parser

1 file changed

+4
-8
lines changed

compiler/rustc_parse/src/parser/item.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,10 @@ impl<'a> Parser<'a> {
128128
Some(item.into_inner())
129129
});
130130

131-
let item =
132-
self.collect_tokens_trailing_token(attrs, force_collect, |this: &mut Self, attrs| {
133-
let item =
134-
this.parse_item_common_(attrs, mac_allowed, attrs_allowed, fn_parse_mode);
135-
Ok((item?, TrailingToken::None))
136-
})?;
137-
138-
Ok(item)
131+
self.collect_tokens_trailing_token(attrs, force_collect, |this, attrs| {
132+
let item = this.parse_item_common_(attrs, mac_allowed, attrs_allowed, fn_parse_mode)?;
133+
Ok((item, TrailingToken::None))
134+
})
139135
}
140136

141137
fn parse_item_common_(

0 commit comments

Comments
 (0)