about summary refs log tree commit diff
path: root/src/test/rustdoc
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2019-11-07 23:53:56 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2019-11-08 07:41:40 +0000
commit33ded3ec7f5dbc133f9371b101310ea606663762 (patch)
treeeb0ba3cf2e4c4f889127ac247f1c6b109b86f315 /src/test/rustdoc
parent2c33568a77cf308c91129e0f0a4d4d53f1689ebb (diff)
downloadrust-33ded3ec7f5dbc133f9371b101310ea606663762.tar.gz
rust-33ded3ec7f5dbc133f9371b101310ea606663762.zip
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 <dsilvers@digital-scurf.org>
Diffstat (limited to 'src/test/rustdoc')
-rw-r--r--src/test/rustdoc/auxiliary/issue-66159-1.rs2
-rw-r--r--src/test/rustdoc/issue-66159.rs10
2 files changed, 12 insertions, 0 deletions
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]