diff options
| author | bors <bors@rust-lang.org> | 2023-12-23 18:37:40 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-12-23 18:37:40 +0000 |
| commit | 520e30be83b4ed57b609d33166c988d1512bf4f3 (patch) | |
| tree | e220191db92fbc21008f4f8926bee24984f71469 /compiler/rustc_metadata/src | |
| parent | 5eccfc388e70d45c98b859af5c14f397ae1c206e (diff) | |
| parent | 7b5dc45897bdd7ba62da99283db736e14a63e7aa (diff) | |
| download | rust-520e30be83b4ed57b609d33166c988d1512bf4f3.tar.gz rust-520e30be83b4ed57b609d33166c988d1512bf4f3.zip | |
Auto merge of #119225 - Mark-Simulacrum:remove-option, r=compiler-errors
Avoid redundant Option for cross_crate_inlinable
Diffstat (limited to 'compiler/rustc_metadata/src')
| -rw-r--r-- | compiler/rustc_metadata/src/rmeta/decoder.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_metadata/src/rmeta/encoder.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_metadata/src/rmeta/mod.rs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_metadata/src/rmeta/decoder.rs b/compiler/rustc_metadata/src/rmeta/decoder.rs index 281a0eafee1..93408861f80 100644 --- a/compiler/rustc_metadata/src/rmeta/decoder.rs +++ b/compiler/rustc_metadata/src/rmeta/decoder.rs @@ -1266,7 +1266,7 @@ impl<'a, 'tcx> CrateMetadataRef<'a> { } 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 { diff --git a/compiler/rustc_metadata/src/rmeta/encoder.rs b/compiler/rustc_metadata/src/rmeta/encoder.rs index 057fb15ac3b..d3d14fae3cb 100644 --- a/compiler/rustc_metadata/src/rmeta/encoder.rs +++ b/compiler/rustc_metadata/src/rmeta/encoder.rs @@ -1607,7 +1607,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> { 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)); diff --git a/compiler/rustc_metadata/src/rmeta/mod.rs b/compiler/rustc_metadata/src/rmeta/mod.rs index 235f0e35cae..52759f43039 100644 --- a/compiler/rustc_metadata/src/rmeta/mod.rs +++ b/compiler/rustc_metadata/src/rmeta/mod.rs @@ -398,6 +398,7 @@ define_tables! { // 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 @@ define_tables! { 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>>>>, |
