Auto merge of #119225 - Mark-Simulacrum:remove-option, r=compiler-errors
Avoid redundant Option for cross_crate_inlinable
This commit is contained in:
commit
520e30be83
@ -1266,7 +1266,7 @@ fn is_item_mir_available(self, id: DefIndex) -> bool {
|
||||
}
|
||||
|
||||
fn cross_crate_inlinable(self, id: DefIndex) -> bool {
|
||||
self.root.tables.cross_crate_inlinable.get(self, id).unwrap_or(false)
|
||||
self.root.tables.cross_crate_inlinable.get(self, id)
|
||||
}
|
||||
|
||||
fn get_fn_has_self_parameter(self, id: DefIndex, sess: &'a Session) -> bool {
|
||||
|
@ -1607,7 +1607,7 @@ fn encode_mir(&mut self) {
|
||||
record!(self.tables.optimized_mir[def_id.to_def_id()] <- tcx.optimized_mir(def_id));
|
||||
self.tables
|
||||
.cross_crate_inlinable
|
||||
.set(def_id.to_def_id().index, Some(self.tcx.cross_crate_inlinable(def_id)));
|
||||
.set(def_id.to_def_id().index, self.tcx.cross_crate_inlinable(def_id));
|
||||
record!(self.tables.closure_saved_names_of_captured_variables[def_id.to_def_id()]
|
||||
<- tcx.closure_saved_names_of_captured_variables(def_id));
|
||||
|
||||
|
@ -398,6 +398,7 @@ fn encode(&self, buf: &mut FileEncoder) -> LazyTables {
|
||||
// That's why the encoded list needs to contain `ModChild` structures describing all the names
|
||||
// individually instead of `DefId`s.
|
||||
module_children_reexports: Table<DefIndex, LazyArray<ModChild>>,
|
||||
cross_crate_inlinable: Table<DefIndex, bool>,
|
||||
|
||||
- optional:
|
||||
attributes: Table<DefIndex, LazyArray<ast::Attribute>>,
|
||||
@ -428,7 +429,6 @@ fn encode(&self, buf: &mut FileEncoder) -> LazyTables {
|
||||
object_lifetime_default: Table<DefIndex, LazyValue<ObjectLifetimeDefault>>,
|
||||
optimized_mir: Table<DefIndex, LazyValue<mir::Body<'static>>>,
|
||||
mir_for_ctfe: Table<DefIndex, LazyValue<mir::Body<'static>>>,
|
||||
cross_crate_inlinable: Table<DefIndex, bool>,
|
||||
closure_saved_names_of_captured_variables: Table<DefIndex, LazyValue<IndexVec<FieldIdx, Symbol>>>,
|
||||
mir_coroutine_witnesses: Table<DefIndex, LazyValue<mir::CoroutineLayout<'static>>>,
|
||||
promoted_mir: Table<DefIndex, LazyValue<IndexVec<mir::Promoted, mir::Body<'static>>>>,
|
||||
|
Loading…
Reference in New Issue
Block a user