From 49cde404124c8217808c71972f206443f49bffc7 Mon Sep 17 00:00:00 2001 From: QuietMisdreavus Date: Wed, 6 Mar 2019 10:57:38 -0600 Subject: [PATCH] add test for spurious intra-doc link warning --- .../rustdoc/auxiliary/intra-links-external-traits.rs | 6 ++++++ src/test/rustdoc/intra-links-external-traits.rs | 12 ++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 src/test/rustdoc/auxiliary/intra-links-external-traits.rs create mode 100644 src/test/rustdoc/intra-links-external-traits.rs diff --git a/src/test/rustdoc/auxiliary/intra-links-external-traits.rs b/src/test/rustdoc/auxiliary/intra-links-external-traits.rs new file mode 100644 index 00000000000..6142dcda986 --- /dev/null +++ b/src/test/rustdoc/auxiliary/intra-links-external-traits.rs @@ -0,0 +1,6 @@ +pub trait ThisTrait { + fn asdf(&self); + + /// let's link to [`asdf`](ThisTrait::asdf) + fn qwop(&self); +} diff --git a/src/test/rustdoc/intra-links-external-traits.rs b/src/test/rustdoc/intra-links-external-traits.rs new file mode 100644 index 00000000000..d6b4a8ad58a --- /dev/null +++ b/src/test/rustdoc/intra-links-external-traits.rs @@ -0,0 +1,12 @@ +// aux-build:intra-links-external-traits.rs +// ignore-cross-compile + +#![crate_name = "outer"] +#![deny(intra_doc_link_resolution_failure)] + +// using a trait that has intra-doc links on it from another crate (whether re-exporting or just +// implementing it) used to give spurious resolution failure warnings + +extern crate intra_links_external_traits; + +pub use intra_links_external_traits::ThisTrait;