Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
- Add test for unresolved `Self`
- Fix ignore syntax
  • Loading branch information
jyn514 committed Oct 9, 2020
1 parent a07ffc7 commit 837dc4e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/test/rustdoc-ui/intra-link-errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
() => {};
Expand Down
10 changes: 9 additions & 1 deletion src/test/rustdoc-ui/intra-link-errors.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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

2 changes: 1 addition & 1 deletion src/test/rustdoc/intra-link-prim-self.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ignore (#75809)
// ignore-test (#75809)
// ignore-tidy-linelength
#![deny(broken_intra_doc_links)]
#![feature(lang_items)]
Expand Down

0 comments on commit 837dc4e

Please sign in to comment.