Skip to content

Commit 837dc4e

Browse files
committed
Fix tests
- Add test for unresolved `Self` - Fix ignore syntax
1 parent a07ffc7 commit 837dc4e

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

src/test/rustdoc-ui/intra-link-errors.rs

+4
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ pub trait T {
9999
//~^ ERROR unresolved link
100100
//~| HELP to link to the macro
101101
//~| NOTE not in the value namespace
102+
/// [Self]
103+
//~^ ERROR unresolved link
104+
//~| no item named `Self` in scope
105+
//~| HELP to escape
102106
#[macro_export]
103107
macro_rules! m {
104108
() => {};

src/test/rustdoc-ui/intra-link-errors.stderr

+9-1
Original file line numberDiff line numberDiff line change
@@ -139,5 +139,13 @@ LL | /// [m()]
139139
| this link resolves to the macro `m`, which is not in the value namespace
140140
| help: to link to the macro, add an exclamation mark: `m!`
141141

142-
error: aborting due to 20 previous errors
142+
error: unresolved link to `Self`
143+
--> $DIR/intra-link-errors.rs:102:6
144+
|
145+
LL | /// [Self]
146+
| ^^^^ no item named `Self` in scope
147+
|
148+
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
149+
150+
error: aborting due to 21 previous errors
143151

src/test/rustdoc/intra-link-prim-self.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// ignore (#75809)
1+
// ignore-test (#75809)
22
// ignore-tidy-linelength
33
#![deny(broken_intra_doc_links)]
44
#![feature(lang_items)]

0 commit comments

Comments
 (0)