Rollup merge of #84101 - jyn514:early-pass, r=Manishearth

rustdoc: Move crate loader to collect_intra_doc_links::early

This groups the similar code together, and also allows making most of collect_intra_doc_links private again.

This builds on https://github.com/rust-lang/rust/pull/84066, but it wouldn't be too hard to base it off master if you want this to land first.
Helps with https://github.com/rust-lang/rust/issues/83761.

r? manishearth

Fixes https://github.com/rust-lang/rust/issues/84046
This commit is contained in:
Dylan DPC 2021-04-12 01:04:10 +02:00 committed by GitHub
commit 1ff117e987
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 220 additions and 133 deletions

View file

@ -0,0 +1 @@
// intentionally empty

View file

@ -0,0 +1 @@
// intentionally empty

View file

@ -1,8 +1,19 @@
// This test is just a little cursed.
// aux-build:issue-66159-1.rs
// aux-crate:priv:issue_66159_1=issue-66159-1.rs
// aux-build:empty.rs
// aux-crate:priv:empty=empty.rs
// aux-build:empty2.rs
// aux-crate:priv:empty2=empty2.rs
// build-aux-docs
// compile-flags:-Z unstable-options
// compile-flags:-Z unstable-options --edition 2018
// @has extern_crate_only_used_in_link/index.html
// @has - '//a[@href="../issue_66159_1/struct.Something.html"]' 'issue_66159_1::Something'
//! [issue_66159_1::Something]
// @has - '//a[@href="../empty/index.html"]' 'empty'
//! [`empty`]
// @has - '//a[@href="../empty2/index.html"]' 'empty2'
//! [empty2<x>]