Skip to content

Commit 05e5530

Browse files
committed
parser: address review comments
1 parent cdbbc25 commit 05e5530

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/librustc_hir/print.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ impl<'a> State<'a> {
648648
self.s.space();
649649
}
650650

651-
if let hir::Constness::Const = constness {
651+
if constness == hir::Constness::Const {
652652
self.word_nbsp("const");
653653
}
654654

src/librustc_parse/parser/item.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ impl<'a> Parser<'a> {
646646
self.expect_semi()?;
647647

648648
let whole_span = lo.to(self.prev_span);
649-
if let IsAuto::Yes = is_auto {
649+
if is_auto == IsAuto::Yes {
650650
let msg = "trait aliases cannot be `auto`";
651651
self.struct_span_err(whole_span, msg).span_label(whole_span, msg).emit();
652652
}

0 commit comments

Comments
 (0)