From 33ded3ec7f5dbc133f9371b101310ea606663762 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Thu, 7 Nov 2019 23:53:56 +0000 Subject: rustdoc: Deliberately load extern crates before processing docs In order that we can successfully later resolve paths in crates which weren't loaded as a result of merely parsing the crate we're documenting, we force the resolution of the path to each crate before cloning the resolver to use later. Closes #66159 Signed-off-by: Daniel Silverstone --- src/test/rustdoc/auxiliary/issue-66159-1.rs | 2 ++ src/test/rustdoc/issue-66159.rs | 10 ++++++++++ 2 files changed, 12 insertions(+) create mode 100644 src/test/rustdoc/auxiliary/issue-66159-1.rs create mode 100644 src/test/rustdoc/issue-66159.rs (limited to 'src/test/rustdoc') diff --git a/src/test/rustdoc/auxiliary/issue-66159-1.rs b/src/test/rustdoc/auxiliary/issue-66159-1.rs new file mode 100644 index 00000000000..2f3d069bd51 --- /dev/null +++ b/src/test/rustdoc/auxiliary/issue-66159-1.rs @@ -0,0 +1,2 @@ +/// This will be referred to by the test docstring +pub struct Something; diff --git a/src/test/rustdoc/issue-66159.rs b/src/test/rustdoc/issue-66159.rs new file mode 100644 index 00000000000..88eca733870 --- /dev/null +++ b/src/test/rustdoc/issue-66159.rs @@ -0,0 +1,10 @@ +// aux-build:issue-66159-1.rs +// extern-private:issue_66159_1 + +// The issue was an ICE which meant that we never actually generated the docs +// so if we have generated the docs, we're okay. +// Since we don't generate the docs for the auxilliary files, we can't actually +// verify that the struct is linked correctly. + +// @has issue_66159/index.html +//! [issue_66159_1::Something] -- cgit 1.4.1-3-g733a5