diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2022-02-01 20:30:32 +0800 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2023-02-10 09:34:13 +0400 |
| commit | b62b82aef4b6aa667161c664fc3ae738c2fc6b9f (patch) | |
| tree | 8810a1d178702e82c4e1a783d52e3515246ea78a /compiler/rustc_middle/src/ty/mod.rs | |
| parent | a12d31d5a681d70f277b4fbf6cafe22bae876ea7 (diff) | |
| download | rust-b62b82aef4b6aa667161c664fc3ae738c2fc6b9f.tar.gz rust-b62b82aef4b6aa667161c664fc3ae738c2fc6b9f.zip | |
Resolve documentation links in rustc and store the results in metadata
This commit implements MCP https://github.com/rust-lang/compiler-team/issues/584 It also removes code that is no longer used, and that includes code cloning resolver, so issue #83761 is fixed.
Diffstat (limited to 'compiler/rustc_middle/src/ty/mod.rs')
| -rw-r--r-- | compiler/rustc_middle/src/ty/mod.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/ty/mod.rs b/compiler/rustc_middle/src/ty/mod.rs index 09c3d5b736c..cff3ba194bd 100644 --- a/compiler/rustc_middle/src/ty/mod.rs +++ b/compiler/rustc_middle/src/ty/mod.rs @@ -36,7 +36,7 @@ use rustc_data_structures::intern::Interned; use rustc_data_structures::stable_hasher::{HashStable, StableHasher}; use rustc_data_structures::tagged_ptr::CopyTaggedPtr; use rustc_hir as hir; -use rustc_hir::def::{CtorKind, CtorOf, DefKind, LifetimeRes, Res}; +use rustc_hir::def::{CtorKind, CtorOf, DefKind, DocLinkResMap, LifetimeRes, Res}; use rustc_hir::def_id::{CrateNum, DefId, DefIdMap, LocalDefId, LocalDefIdMap}; use rustc_hir::Node; use rustc_index::vec::IndexVec; @@ -181,6 +181,8 @@ pub struct ResolverGlobalCtxt { /// exist under `std`. For example, wrote `str::from_utf8` instead of `std::str::from_utf8`. pub confused_type_with_std_module: FxHashMap<Span, Span>, pub registered_tools: RegisteredTools, + pub doc_link_resolutions: FxHashMap<LocalDefId, DocLinkResMap>, + pub doc_link_traits_in_scope: FxHashMap<LocalDefId, Vec<DefId>>, } /// Resolutions that should only be used for lowering. |
