rustdoc: update tests to match new lint behavior
This commit is contained in:
parent
a7da4b829d
commit
041348110e
3 changed files with 3 additions and 25 deletions
|
|
@ -10,4 +10,6 @@
|
|||
/// attempted link to method: [`Foo.bar()`] //~ERROR unresolved link
|
||||
///
|
||||
/// classic broken intra-doc link: [`Bar`] //~ERROR unresolved link
|
||||
///
|
||||
/// no backticks, so we let this one slide: [Foo.bar()]
|
||||
pub struct Foo;
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ pub struct XLinkToCloneWithStartSpace;
|
|||
/// [x][struct@Clone ] //~ERROR link
|
||||
pub struct XLinkToCloneWithEndSpace;
|
||||
|
||||
/// [x][Clone\(\)] //~ERROR link
|
||||
/// [x][Clone\(\)]
|
||||
pub struct XLinkToCloneWithEscapedParens;
|
||||
|
||||
/// [x][`Clone`] not URL-shaped enough
|
||||
|
|
|
|||
|
|
@ -123,14 +123,6 @@ LL - /// [x][struct@Clone ]
|
|||
LL + /// [x][trait@Clone ]
|
||||
|
|
||||
|
||||
error: unresolved link to `Clone\(\)`
|
||||
--> $DIR/weird-syntax.rs:68:9
|
||||
|
|
||||
LL | /// [x][Clone\(\)]
|
||||
| ^^^^^^^^^ no item named `Clone\(\)` in scope
|
||||
|
|
||||
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
|
||||
|
||||
error: unresolved link to `Clone`
|
||||
--> $DIR/weird-syntax.rs:74:9
|
||||
|
|
||||
|
|
@ -307,21 +299,5 @@ LL | /// - [`SDL_PROP_WINDOW_CREATE_COCOA_WINDOW_POINTER`]: the
|
|||
|
|
||||
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
|
||||
|
||||
error: unresolved link to `Clone`
|
||||
--> $DIR/weird-syntax.rs:132:9
|
||||
|
|
||||
LL | /// The [cln][] link here will produce a plain text suggestion
|
||||
| ^^^^^ this link resolves to the trait `Clone`, which is not a function
|
||||
|
|
||||
= help: to link to the trait, prefix with `trait@`: trait@Clone
|
||||
|
||||
error: incompatible link kind for `Clone`
|
||||
--> $DIR/weird-syntax.rs:137:9
|
||||
|
|
||||
LL | /// The [cln][] link here will produce a plain text suggestion
|
||||
| ^^^^^ this link resolved to a trait, which is not a struct
|
||||
|
|
||||
= help: to link to the trait, prefix with `trait@`: trait@Clone
|
||||
|
||||
error: aborting due to 27 previous errors
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue