diff options
| author | bors <bors@rust-lang.org> | 2021-01-13 01:40:41 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-01-13 01:40:41 +0000 |
| commit | 150d1fee04856ff158e34e8d687a7fe59e97ef33 (patch) | |
| tree | ff41418d95d6a5e8d493980c14fa249f59fc1099 /compiler/rustc_metadata/src | |
| parent | 058a71016553f267ae80b90276ef79956457d51a (diff) | |
| parent | a8ff647deb102f4669025be3ba45ae2990ef0c08 (diff) | |
| download | rust-150d1fee04856ff158e34e8d687a7fe59e97ef33.tar.gz rust-150d1fee04856ff158e34e8d687a7fe59e97ef33.zip | |
Auto merge of #79322 - jyn514:refactor-impl, r=estebank
Separate out a `hir::Impl` struct This makes it possible to pass the `Impl` directly to functions, instead of having to pass each of the many fields one at a time. It also simplifies matches in many cases. See `rustc_save_analysis::dump_visitor::process_impl` or `rustdoc::clean::clean_impl` for a good example of how this makes `impl`s easier to work with. r? `@petrochenkov` maybe?
Diffstat (limited to 'compiler/rustc_metadata/src')
| -rw-r--r-- | compiler/rustc_metadata/src/rmeta/encoder.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_metadata/src/rmeta/encoder.rs b/compiler/rustc_metadata/src/rmeta/encoder.rs index ccaee8608b6..99614a300a3 100644 --- a/compiler/rustc_metadata/src/rmeta/encoder.rs +++ b/compiler/rustc_metadata/src/rmeta/encoder.rs @@ -1283,7 +1283,7 @@ impl EncodeContext<'a, 'tcx> { is_non_exhaustive: variant.is_field_list_non_exhaustive(), }), adt_def.repr) } - hir::ItemKind::Impl { defaultness, .. } => { + hir::ItemKind::Impl(hir::Impl { defaultness, .. }) => { let trait_ref = self.tcx.impl_trait_ref(def_id); let polarity = self.tcx.impl_polarity(def_id); let parent = if let Some(trait_ref) = trait_ref { |
