From 837dc4e8867664e29d4ecd066065d7f6bfe3646e Mon Sep 17 00:00:00 2001 From: Joshua Nelson Date: Thu, 8 Oct 2020 20:23:03 -0400 Subject: [PATCH] Fix tests - Add test for unresolved `Self` - Fix ignore syntax --- src/test/rustdoc-ui/intra-link-errors.rs | 4 ++++ src/test/rustdoc-ui/intra-link-errors.stderr | 10 +++++++++- src/test/rustdoc/intra-link-prim-self.rs | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/test/rustdoc-ui/intra-link-errors.rs b/src/test/rustdoc-ui/intra-link-errors.rs index ef928ae02f3e3..ae0432d42ad52 100644 --- a/src/test/rustdoc-ui/intra-link-errors.rs +++ b/src/test/rustdoc-ui/intra-link-errors.rs @@ -99,6 +99,10 @@ pub trait T { //~^ ERROR unresolved link //~| HELP to link to the macro //~| NOTE not in the value namespace +/// [Self] +//~^ ERROR unresolved link +//~| no item named `Self` in scope +//~| HELP to escape #[macro_export] macro_rules! m { () => {}; diff --git a/src/test/rustdoc-ui/intra-link-errors.stderr b/src/test/rustdoc-ui/intra-link-errors.stderr index 31e7fc48afde5..ec6d8f187d8c0 100644 --- a/src/test/rustdoc-ui/intra-link-errors.stderr +++ b/src/test/rustdoc-ui/intra-link-errors.stderr @@ -139,5 +139,13 @@ LL | /// [m()] | this link resolves to the macro `m`, which is not in the value namespace | help: to link to the macro, add an exclamation mark: `m!` -error: aborting due to 20 previous errors +error: unresolved link to `Self` + --> $DIR/intra-link-errors.rs:102:6 + | +LL | /// [Self] + | ^^^^ no item named `Self` in scope + | + = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` + +error: aborting due to 21 previous errors diff --git a/src/test/rustdoc/intra-link-prim-self.rs b/src/test/rustdoc/intra-link-prim-self.rs index e6438aab4e48c..d74ca521fc0ce 100644 --- a/src/test/rustdoc/intra-link-prim-self.rs +++ b/src/test/rustdoc/intra-link-prim-self.rs @@ -1,4 +1,4 @@ -// ignore (#75809) +// ignore-test (#75809) // ignore-tidy-linelength #![deny(broken_intra_doc_links)] #![feature(lang_items)]