Skip to content

Commit 520e30b

Browse files
committed
Auto merge of rust-lang#119225 - Mark-Simulacrum:remove-option, r=compiler-errors
Avoid redundant Option for cross_crate_inlinable
2 parents 5eccfc3 + 7b5dc45 commit 520e30b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

compiler/rustc_metadata/src/rmeta/decoder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1266,7 +1266,7 @@ impl<'a, 'tcx> CrateMetadataRef<'a> {
12661266
}
12671267

12681268
fn cross_crate_inlinable(self, id: DefIndex) -> bool {
1269-
self.root.tables.cross_crate_inlinable.get(self, id).unwrap_or(false)
1269+
self.root.tables.cross_crate_inlinable.get(self, id)
12701270
}
12711271

12721272
fn get_fn_has_self_parameter(self, id: DefIndex, sess: &'a Session) -> bool {

compiler/rustc_metadata/src/rmeta/encoder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1607,7 +1607,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
16071607
record!(self.tables.optimized_mir[def_id.to_def_id()] <- tcx.optimized_mir(def_id));
16081608
self.tables
16091609
.cross_crate_inlinable
1610-
.set(def_id.to_def_id().index, Some(self.tcx.cross_crate_inlinable(def_id)));
1610+
.set(def_id.to_def_id().index, self.tcx.cross_crate_inlinable(def_id));
16111611
record!(self.tables.closure_saved_names_of_captured_variables[def_id.to_def_id()]
16121612
<- tcx.closure_saved_names_of_captured_variables(def_id));
16131613

compiler/rustc_metadata/src/rmeta/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,7 @@ define_tables! {
398398
// That's why the encoded list needs to contain `ModChild` structures describing all the names
399399
// individually instead of `DefId`s.
400400
module_children_reexports: Table<DefIndex, LazyArray<ModChild>>,
401+
cross_crate_inlinable: Table<DefIndex, bool>,
401402

402403
- optional:
403404
attributes: Table<DefIndex, LazyArray<ast::Attribute>>,
@@ -428,7 +429,6 @@ define_tables! {
428429
object_lifetime_default: Table<DefIndex, LazyValue<ObjectLifetimeDefault>>,
429430
optimized_mir: Table<DefIndex, LazyValue<mir::Body<'static>>>,
430431
mir_for_ctfe: Table<DefIndex, LazyValue<mir::Body<'static>>>,
431-
cross_crate_inlinable: Table<DefIndex, bool>,
432432
closure_saved_names_of_captured_variables: Table<DefIndex, LazyValue<IndexVec<FieldIdx, Symbol>>>,
433433
mir_coroutine_witnesses: Table<DefIndex, LazyValue<mir::CoroutineLayout<'static>>>,
434434
promoted_mir: Table<DefIndex, LazyValue<IndexVec<mir::Promoted, mir::Body<'static>>>>,

0 commit comments

Comments
 (0)