From 6f0413316f786dc27de5af8d15a070f368f8746d Mon Sep 17 00:00:00 2001 From: max-heller Date: Mon, 4 Jan 2021 15:38:30 -0500 Subject: [PATCH] fix incompatible disambiguator test --- .../incompatible-primitive-disambiguator.rs | 3 +++ .../incompatible-primitive-disambiguator.stderr | 15 +++++++++++++++ .../incompatible-primitive-disambiguator.rs | 2 -- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 src/test/rustdoc-ui/intra-doc/incompatible-primitive-disambiguator.rs create mode 100644 src/test/rustdoc-ui/intra-doc/incompatible-primitive-disambiguator.stderr delete mode 100644 src/test/rustdoc/intra-doc/incompatible-primitive-disambiguator.rs diff --git a/src/test/rustdoc-ui/intra-doc/incompatible-primitive-disambiguator.rs b/src/test/rustdoc-ui/intra-doc/incompatible-primitive-disambiguator.rs new file mode 100644 index 00000000000..0d1d5d1134b --- /dev/null +++ b/src/test/rustdoc-ui/intra-doc/incompatible-primitive-disambiguator.rs @@ -0,0 +1,3 @@ +#![deny(broken_intra_doc_links)] +//! [static@u8::MIN] +//~^ ERROR incompatible link kind diff --git a/src/test/rustdoc-ui/intra-doc/incompatible-primitive-disambiguator.stderr b/src/test/rustdoc-ui/intra-doc/incompatible-primitive-disambiguator.stderr new file mode 100644 index 00000000000..ed1c10f9e0c --- /dev/null +++ b/src/test/rustdoc-ui/intra-doc/incompatible-primitive-disambiguator.stderr @@ -0,0 +1,15 @@ +error: incompatible link kind for `u8::MIN` + --> $DIR/incompatible-primitive-disambiguator.rs:2:6 + | +LL | //! [static@u8::MIN] + | ^^^^^^^^^^^^^^ help: to link to the associated constant, prefix with `const@`: `const@u8::MIN` + | +note: the lint level is defined here + --> $DIR/incompatible-primitive-disambiguator.rs:1:9 + | +LL | #![deny(broken_intra_doc_links)] + | ^^^^^^^^^^^^^^^^^^^^^^ + = note: this link resolved to an associated constant, which is not a static + +error: aborting due to previous error + diff --git a/src/test/rustdoc/intra-doc/incompatible-primitive-disambiguator.rs b/src/test/rustdoc/intra-doc/incompatible-primitive-disambiguator.rs deleted file mode 100644 index 1ea6ad9c7e6..00000000000 --- a/src/test/rustdoc/intra-doc/incompatible-primitive-disambiguator.rs +++ /dev/null @@ -1,2 +0,0 @@ -#![deny(broken_intra_doc_links)] -//! [struct@str::trim] //~ ERROR incompatible link