From e33a205bdfb0fbbbad80f49e4d39180dc78087bf Mon Sep 17 00:00:00 2001 From: max-heller Date: Sun, 3 Jan 2021 20:34:07 -0500 Subject: [PATCH] primitive disambiguator tests --- .../rustdoc/intra-doc/incompatible-primitive-disambiguator.rs | 2 ++ src/test/rustdoc/intra-doc/primitive-disambiguators.rs | 4 ++++ src/test/rustdoc/issue-80559.rs | 4 ---- 3 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 src/test/rustdoc/intra-doc/incompatible-primitive-disambiguator.rs create mode 100644 src/test/rustdoc/intra-doc/primitive-disambiguators.rs delete mode 100644 src/test/rustdoc/issue-80559.rs diff --git a/src/test/rustdoc/intra-doc/incompatible-primitive-disambiguator.rs b/src/test/rustdoc/intra-doc/incompatible-primitive-disambiguator.rs new file mode 100644 index 00000000000..1ea6ad9c7e6 --- /dev/null +++ b/src/test/rustdoc/intra-doc/incompatible-primitive-disambiguator.rs @@ -0,0 +1,2 @@ +#![deny(broken_intra_doc_links)] +//! [struct@str::trim] //~ ERROR incompatible link diff --git a/src/test/rustdoc/intra-doc/primitive-disambiguators.rs b/src/test/rustdoc/intra-doc/primitive-disambiguators.rs new file mode 100644 index 00000000000..acdd07566c9 --- /dev/null +++ b/src/test/rustdoc/intra-doc/primitive-disambiguators.rs @@ -0,0 +1,4 @@ +#![deny(broken_intra_doc_links)] +// @has primitive_disambiguators/index.html +// @has - '//a/@href' 'https://doc.rust-lang.org/nightly/std/primitive.str.html#method.trim' +//! [str::trim()] diff --git a/src/test/rustdoc/issue-80559.rs b/src/test/rustdoc/issue-80559.rs deleted file mode 100644 index 34905c48653..00000000000 --- a/src/test/rustdoc/issue-80559.rs +++ /dev/null @@ -1,4 +0,0 @@ -#![deny(broken_intra_doc_links)] -// Should link to https://doc.rust-lang.org/nightly/std/primitive.str.html#method.trim -// and not suggest prefixing with `prim@` -//! [str::trim()]