Skip to content

Commit c489b92

Browse files
committed
Not encoding the default is already handled by set
1 parent a3062aa commit c489b92

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

compiler/rustc_metadata/src/rmeta/encoder.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1524,17 +1524,11 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
15241524
}
15251525
if should_encode_constness(def_kind) {
15261526
let constness = self.tcx.constness(def_id);
1527-
match constness {
1528-
hir::Constness::Const => self.tables.constness.set(def_id.index, constness),
1529-
hir::Constness::NotConst => {}
1530-
}
1527+
self.tables.constness.set(def_id.index, constness);
15311528
}
15321529
if let DefKind::Fn | DefKind::AssocFn = def_kind {
15331530
let asyncness = tcx.asyncness(def_id);
1534-
match asyncness {
1535-
ty::Asyncness::Yes => self.tables.asyncness.set(def_id.index, asyncness),
1536-
ty::Asyncness::No => {}
1537-
}
1531+
self.tables.asyncness.set(def_id.index, asyncness);
15381532
record_array!(self.tables.fn_arg_idents[def_id] <- tcx.fn_arg_idents(def_id));
15391533
}
15401534
if let Some(name) = tcx.intrinsic(def_id) {

0 commit comments

Comments
 (0)