Skip to content

Commit acabed7

Browse files
committed
Style improvement
1 parent 4138702 commit acabed7

File tree

1 file changed

+3
-2
lines changed
  • compiler/rustc_parse/src/parser

1 file changed

+3
-2
lines changed

compiler/rustc_parse/src/parser/item.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1143,8 +1143,9 @@ impl<'a> Parser<'a> {
11431143
Ok(kind) => kind,
11441144
Err(kind) => match kind {
11451145
ItemKind::Const(box ConstItem { ty, expr, .. }) => {
1146-
let const_span = Some(span.with_hi(ident.span.lo()))
1147-
.filter(|span| span.can_be_used_for_suggestions());
1146+
let const_span = span
1147+
.can_be_used_for_suggestions()
1148+
.then(|| span.with_hi(ident.span.lo()));
11481149
self.sess.emit_err(errors::ExternItemCannotBeConst {
11491150
ident_span: ident.span,
11501151
const_span,

0 commit comments

Comments
 (0)