diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2021-05-11 13:39:19 +0200 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2021-05-12 13:58:44 +0200 |
| commit | 837f3e3e67007d748e993a080c3ea4b07ee465a0 (patch) | |
| tree | 91c31527b229ab32be6d55d7717ad66b19c049bf /compiler/rustc_metadata/src | |
| parent | 3aa6f3e8f52e72599d8588025adfe55a9a934c49 (diff) | |
Use () for inherent_impls.
Diffstat (limited to 'compiler/rustc_metadata/src')
| -rw-r--r-- | compiler/rustc_metadata/src/rmeta/encoder.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_metadata/src/rmeta/encoder.rs b/compiler/rustc_metadata/src/rmeta/encoder.rs index 707d72d58d5..99b8ff5abd3 100644 --- a/compiler/rustc_metadata/src/rmeta/encoder.rs +++ b/compiler/rustc_metadata/src/rmeta/encoder.rs @@ -944,13 +944,12 @@ impl EncodeContext<'a, 'tcx> { record!(self.tables.super_predicates[def_id] <- self.tcx.super_predicates_of(def_id)); } } - let inherent_impls = tcx.crate_inherent_impls(LOCAL_CRATE); + let inherent_impls = tcx.crate_inherent_impls(()); for (def_id, implementations) in inherent_impls.inherent_impls.iter() { - assert!(def_id.is_local()); if implementations.is_empty() { continue; } - record!(self.tables.inherent_impls[def_id] <- implementations.iter().map(|&def_id| { + record!(self.tables.inherent_impls[def_id.to_def_id()] <- implementations.iter().map(|&def_id| { assert!(def_id.is_local()); def_id.index })); |
