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.
This commit is contained in:
@@ -95,7 +95,7 @@ impl<'a> Resolver<'a> {
|
||||
/// Reachable macros with block module parents exist due to `#[macro_export] macro_rules!`,
|
||||
/// but they cannot use def-site hygiene, so the assumption holds
|
||||
/// (<https://github.com/rust-lang/rust/pull/77984#issuecomment-712445508>).
|
||||
pub fn get_nearest_non_block_module(&mut self, mut def_id: DefId) -> Module<'a> {
|
||||
pub(crate) fn get_nearest_non_block_module(&mut self, mut def_id: DefId) -> Module<'a> {
|
||||
loop {
|
||||
match self.get_module(def_id) {
|
||||
Some(module) => return module,
|
||||
@@ -104,7 +104,7 @@ impl<'a> Resolver<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn expect_module(&mut self, def_id: DefId) -> Module<'a> {
|
||||
pub(crate) fn expect_module(&mut self, def_id: DefId) -> Module<'a> {
|
||||
self.get_module(def_id).expect("argument `DefId` is not a module")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user