Skip to content

Commit 5485535

Browse files
committed
rustdoc: update tests to match new lint behavior
1 parent 333f802 commit 5485535

File tree

3 files changed

+3
-25
lines changed

3 files changed

+3
-25
lines changed

tests/rustdoc-ui/bad-intra-doc.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@
1010
/// attempted link to method: [`Foo.bar()`] //~ERROR unresolved link
1111
///
1212
/// classic broken intra-doc link: [`Bar`] //~ERROR unresolved link
13+
///
14+
/// no backticks, so we let this one slide: [Foo.bar()]
1315
pub struct Foo;

tests/rustdoc-ui/intra-doc/weird-syntax.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ pub struct XLinkToCloneWithStartSpace;
6565
/// [x][struct@Clone ] //~ERROR link
6666
pub struct XLinkToCloneWithEndSpace;
6767

68-
/// [x][Clone\(\)] //~ERROR link
68+
/// [x][Clone\(\)]
6969
pub struct XLinkToCloneWithEscapedParens;
7070

7171
/// [x][`Clone`] not URL-shaped enough

tests/rustdoc-ui/intra-doc/weird-syntax.stderr

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,6 @@ LL - /// [x][struct@Clone ]
123123
LL + /// [x][trait@Clone ]
124124
|
125125

126-
error: unresolved link to `Clone\(\)`
127-
--> $DIR/weird-syntax.rs:68:9
128-
|
129-
LL | /// [x][Clone\(\)]
130-
| ^^^^^^^^^ no item named `Clone\(\)` in scope
131-
|
132-
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
133-
134126
error: unresolved link to `Clone`
135127
--> $DIR/weird-syntax.rs:74:9
136128
|
@@ -307,21 +299,5 @@ LL | /// - [`SDL_PROP_WINDOW_CREATE_COCOA_WINDOW_POINTER`]: the
307299
|
308300
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
309301

310-
error: unresolved link to `Clone`
311-
--> $DIR/weird-syntax.rs:132:9
312-
|
313-
LL | /// The [cln][] link here will produce a plain text suggestion
314-
| ^^^^^ this link resolves to the trait `Clone`, which is not a function
315-
|
316-
= help: to link to the trait, prefix with `trait@`: trait@Clone
317-
318-
error: incompatible link kind for `Clone`
319-
--> $DIR/weird-syntax.rs:137:9
320-
|
321-
LL | /// The [cln][] link here will produce a plain text suggestion
322-
| ^^^^^ this link resolved to a trait, which is not a struct
323-
|
324-
= help: to link to the trait, prefix with `trait@`: trait@Clone
325-
326302
error: aborting due to 27 previous errors
327303

0 commit comments

Comments
 (0)