adjust more unit tests to reflect more aggressive intra-doc linting
This commit is contained in:
parent
5ae2d42a8c
commit
87d7d80cec
6 changed files with 230 additions and 21 deletions
|
|
@ -2,67 +2,67 @@
|
|||
//@ normalize-stderr: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL"
|
||||
|
||||
//! [struct@m!()] //~ WARN: unmatched disambiguator `struct` and suffix `!()`
|
||||
//! [struct@m!{}]
|
||||
//! [struct@m!{}] //~ WARN: unmatched disambiguator `struct` and suffix `!{}`
|
||||
//! [struct@m![]]
|
||||
//! [struct@f()] //~ WARN: unmatched disambiguator `struct` and suffix `()`
|
||||
//! [struct@m!] //~ WARN: unmatched disambiguator `struct` and suffix `!`
|
||||
//!
|
||||
//! [enum@m!()] //~ WARN: unmatched disambiguator `enum` and suffix `!()`
|
||||
//! [enum@m!{}]
|
||||
//! [enum@m!{}] //~ WARN: unmatched disambiguator `enum` and suffix `!{}`
|
||||
//! [enum@m![]]
|
||||
//! [enum@f()] //~ WARN: unmatched disambiguator `enum` and suffix `()`
|
||||
//! [enum@m!] //~ WARN: unmatched disambiguator `enum` and suffix `!`
|
||||
//!
|
||||
//! [trait@m!()] //~ WARN: unmatched disambiguator `trait` and suffix `!()`
|
||||
//! [trait@m!{}]
|
||||
//! [trait@m!{}] //~ WARN: unmatched disambiguator `trait` and suffix `!{}`
|
||||
//! [trait@m![]]
|
||||
//! [trait@f()] //~ WARN: unmatched disambiguator `trait` and suffix `()`
|
||||
//! [trait@m!] //~ WARN: unmatched disambiguator `trait` and suffix `!`
|
||||
//!
|
||||
//! [module@m!()] //~ WARN: unmatched disambiguator `module` and suffix `!()`
|
||||
//! [module@m!{}]
|
||||
//! [module@m!{}] //~ WARN: unmatched disambiguator `module` and suffix `!{}`
|
||||
//! [module@m![]]
|
||||
//! [module@f()] //~ WARN: unmatched disambiguator `module` and suffix `()`
|
||||
//! [module@m!] //~ WARN: unmatched disambiguator `module` and suffix `!`
|
||||
//!
|
||||
//! [mod@m!()] //~ WARN: unmatched disambiguator `mod` and suffix `!()`
|
||||
//! [mod@m!{}]
|
||||
//! [mod@m!{}] //~ WARN: unmatched disambiguator `mod` and suffix `!{}`
|
||||
//! [mod@m![]]
|
||||
//! [mod@f()] //~ WARN: unmatched disambiguator `mod` and suffix `()`
|
||||
//! [mod@m!] //~ WARN: unmatched disambiguator `mod` and suffix `!`
|
||||
//!
|
||||
//! [const@m!()] //~ WARN: unmatched disambiguator `const` and suffix `!()`
|
||||
//! [const@m!{}]
|
||||
//! [const@m!{}] //~ WARN: unmatched disambiguator `const` and suffix `!{}`
|
||||
//! [const@m![]]
|
||||
//! [const@f()] //~ WARN: incompatible link kind for `f`
|
||||
//! [const@m!] //~ WARN: unmatched disambiguator `const` and suffix `!`
|
||||
//!
|
||||
//! [constant@m!()] //~ WARN: unmatched disambiguator `constant` and suffix `!()`
|
||||
//! [constant@m!{}]
|
||||
//! [constant@m!{}] //~ WARN: unmatched disambiguator `constant` and suffix `!{}`
|
||||
//! [constant@m![]]
|
||||
//! [constant@f()] //~ WARN: incompatible link kind for `f`
|
||||
//! [constant@m!] //~ WARN: unmatched disambiguator `constant` and suffix `!`
|
||||
//!
|
||||
//! [static@m!()] //~ WARN: unmatched disambiguator `static` and suffix `!()`
|
||||
//! [static@m!{}]
|
||||
//! [static@m!{}] //~ WARN: unmatched disambiguator `static` and suffix `!{}`
|
||||
//! [static@m![]]
|
||||
//! [static@f()] //~ WARN: incompatible link kind for `f`
|
||||
//! [static@m!] //~ WARN: unmatched disambiguator `static` and suffix `!`
|
||||
//!
|
||||
//! [function@m!()] //~ WARN: unmatched disambiguator `function` and suffix `!()`
|
||||
//! [function@m!{}]
|
||||
//! [function@m!{}] //~ WARN: unmatched disambiguator `function` and suffix `!{}`
|
||||
//! [function@m![]]
|
||||
//! [function@f()]
|
||||
//! [function@m!] //~ WARN: unmatched disambiguator `function` and suffix `!`
|
||||
//!
|
||||
//! [fn@m!()] //~ WARN: unmatched disambiguator `fn` and suffix `!()`
|
||||
//! [fn@m!{}]
|
||||
//! [fn@m!{}] //~ WARN: unmatched disambiguator `fn` and suffix `!{}`
|
||||
//! [fn@m![]]
|
||||
//! [fn@f()]
|
||||
//! [fn@m!] //~ WARN: unmatched disambiguator `fn` and suffix `!`
|
||||
//!
|
||||
//! [method@m!()] //~ WARN: unmatched disambiguator `method` and suffix `!()`
|
||||
//! [method@m!{}]
|
||||
//! [method@m!{}] //~ WARN: unmatched disambiguator `method` and suffix `!{}`
|
||||
//! [method@m![]]
|
||||
//! [method@f()]
|
||||
//! [method@m!] //~ WARN: unmatched disambiguator `method` and suffix `!`
|
||||
|
|
@ -74,13 +74,13 @@
|
|||
//! [derive@m!] //~ WARN: incompatible link kind for `m`
|
||||
//!
|
||||
//! [type@m!()] //~ WARN: unmatched disambiguator `type` and suffix `!()`
|
||||
//! [type@m!{}]
|
||||
//! [type@m!{}] //~ WARN: unmatched disambiguator `type` and suffix `!{}`
|
||||
//! [type@m![]]
|
||||
//! [type@f()] //~ WARN: unmatched disambiguator `type` and suffix `()`
|
||||
//! [type@m!] //~ WARN: unmatched disambiguator `type` and suffix `!`
|
||||
//!
|
||||
//! [value@m!()] //~ WARN: unmatched disambiguator `value` and suffix `!()`
|
||||
//! [value@m!{}]
|
||||
//! [value@m!{}] //~ WARN: unmatched disambiguator `value` and suffix `!{}`
|
||||
//! [value@m![]]
|
||||
//! [value@f()]
|
||||
//! [value@m!] //~ WARN: unmatched disambiguator `value` and suffix `!`
|
||||
|
|
@ -92,13 +92,13 @@
|
|||
//! [macro@m!]
|
||||
//!
|
||||
//! [prim@m!()] //~ WARN: unmatched disambiguator `prim` and suffix `!()`
|
||||
//! [prim@m!{}]
|
||||
//! [prim@m!{}] //~ WARN: unmatched disambiguator `prim` and suffix `!{}`
|
||||
//! [prim@m![]]
|
||||
//! [prim@f()] //~ WARN: unmatched disambiguator `prim` and suffix `()`
|
||||
//! [prim@m!] //~ WARN: unmatched disambiguator `prim` and suffix `!`
|
||||
//!
|
||||
//! [primitive@m!()] //~ WARN: unmatched disambiguator `primitive` and suffix `!()`
|
||||
//! [primitive@m!{}]
|
||||
//! [primitive@m!{}] //~ WARN: unmatched disambiguator `primitive` and suffix `!{}`
|
||||
//! [primitive@m![]]
|
||||
//! [primitive@f()] //~ WARN: unmatched disambiguator `primitive` and suffix `()`
|
||||
//! [primitive@m!] //~ WARN: unmatched disambiguator `primitive` and suffix `!`
|
||||
|
|
|
|||
|
|
@ -7,6 +7,14 @@ LL | //! [struct@m!()]
|
|||
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
|
||||
= note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default
|
||||
|
||||
warning: unmatched disambiguator `struct` and suffix `!{}`
|
||||
--> $DIR/disambiguator-endswith-named-suffix.rs:5:6
|
||||
|
|
||||
LL | //! [struct@m!{}]
|
||||
| ^^^^^^
|
||||
|
|
||||
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
|
||||
|
||||
warning: unmatched disambiguator `struct` and suffix `()`
|
||||
--> $DIR/disambiguator-endswith-named-suffix.rs:7:6
|
||||
|
|
||||
|
|
@ -31,6 +39,14 @@ LL | //! [enum@m!()]
|
|||
|
|
||||
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
|
||||
|
||||
warning: unmatched disambiguator `enum` and suffix `!{}`
|
||||
--> $DIR/disambiguator-endswith-named-suffix.rs:11:6
|
||||
|
|
||||
LL | //! [enum@m!{}]
|
||||
| ^^^^
|
||||
|
|
||||
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
|
||||
|
||||
warning: unmatched disambiguator `enum` and suffix `()`
|
||||
--> $DIR/disambiguator-endswith-named-suffix.rs:13:6
|
||||
|
|
||||
|
|
@ -55,6 +71,14 @@ LL | //! [trait@m!()]
|
|||
|
|
||||
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
|
||||
|
||||
warning: unmatched disambiguator `trait` and suffix `!{}`
|
||||
--> $DIR/disambiguator-endswith-named-suffix.rs:17:6
|
||||
|
|
||||
LL | //! [trait@m!{}]
|
||||
| ^^^^^
|
||||
|
|
||||
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
|
||||
|
||||
warning: unmatched disambiguator `trait` and suffix `()`
|
||||
--> $DIR/disambiguator-endswith-named-suffix.rs:19:6
|
||||
|
|
||||
|
|
@ -79,6 +103,14 @@ LL | //! [module@m!()]
|
|||
|
|
||||
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
|
||||
|
||||
warning: unmatched disambiguator `module` and suffix `!{}`
|
||||
--> $DIR/disambiguator-endswith-named-suffix.rs:23:6
|
||||
|
|
||||
LL | //! [module@m!{}]
|
||||
| ^^^^^^
|
||||
|
|
||||
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
|
||||
|
||||
warning: unmatched disambiguator `module` and suffix `()`
|
||||
--> $DIR/disambiguator-endswith-named-suffix.rs:25:6
|
||||
|
|
||||
|
|
@ -103,6 +135,14 @@ LL | //! [mod@m!()]
|
|||
|
|
||||
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
|
||||
|
||||
warning: unmatched disambiguator `mod` and suffix `!{}`
|
||||
--> $DIR/disambiguator-endswith-named-suffix.rs:29:6
|
||||
|
|
||||
LL | //! [mod@m!{}]
|
||||
| ^^^
|
||||
|
|
||||
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
|
||||
|
||||
warning: unmatched disambiguator `mod` and suffix `()`
|
||||
--> $DIR/disambiguator-endswith-named-suffix.rs:31:6
|
||||
|
|
||||
|
|
@ -127,6 +167,14 @@ LL | //! [const@m!()]
|
|||
|
|
||||
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
|
||||
|
||||
warning: unmatched disambiguator `const` and suffix `!{}`
|
||||
--> $DIR/disambiguator-endswith-named-suffix.rs:35:6
|
||||
|
|
||||
LL | //! [const@m!{}]
|
||||
| ^^^^^
|
||||
|
|
||||
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
|
||||
|
||||
warning: incompatible link kind for `f`
|
||||
--> $DIR/disambiguator-endswith-named-suffix.rs:37:6
|
||||
|
|
||||
|
|
@ -155,6 +203,14 @@ LL | //! [constant@m!()]
|
|||
|
|
||||
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
|
||||
|
||||
warning: unmatched disambiguator `constant` and suffix `!{}`
|
||||
--> $DIR/disambiguator-endswith-named-suffix.rs:41:6
|
||||
|
|
||||
LL | //! [constant@m!{}]
|
||||
| ^^^^^^^^
|
||||
|
|
||||
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
|
||||
|
||||
warning: incompatible link kind for `f`
|
||||
--> $DIR/disambiguator-endswith-named-suffix.rs:43:6
|
||||
|
|
||||
|
|
@ -183,6 +239,14 @@ LL | //! [static@m!()]
|
|||
|
|
||||
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
|
||||
|
||||
warning: unmatched disambiguator `static` and suffix `!{}`
|
||||
--> $DIR/disambiguator-endswith-named-suffix.rs:47:6
|
||||
|
|
||||
LL | //! [static@m!{}]
|
||||
| ^^^^^^
|
||||
|
|
||||
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
|
||||
|
||||
warning: incompatible link kind for `f`
|
||||
--> $DIR/disambiguator-endswith-named-suffix.rs:49:6
|
||||
|
|
||||
|
|
@ -211,6 +275,14 @@ LL | //! [function@m!()]
|
|||
|
|
||||
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
|
||||
|
||||
warning: unmatched disambiguator `function` and suffix `!{}`
|
||||
--> $DIR/disambiguator-endswith-named-suffix.rs:53:6
|
||||
|
|
||||
LL | //! [function@m!{}]
|
||||
| ^^^^^^^^
|
||||
|
|
||||
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
|
||||
|
||||
warning: unmatched disambiguator `function` and suffix `!`
|
||||
--> $DIR/disambiguator-endswith-named-suffix.rs:56:6
|
||||
|
|
||||
|
|
@ -227,6 +299,14 @@ LL | //! [fn@m!()]
|
|||
|
|
||||
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
|
||||
|
||||
warning: unmatched disambiguator `fn` and suffix `!{}`
|
||||
--> $DIR/disambiguator-endswith-named-suffix.rs:59:6
|
||||
|
|
||||
LL | //! [fn@m!{}]
|
||||
| ^^
|
||||
|
|
||||
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
|
||||
|
||||
warning: unmatched disambiguator `fn` and suffix `!`
|
||||
--> $DIR/disambiguator-endswith-named-suffix.rs:62:6
|
||||
|
|
||||
|
|
@ -243,6 +323,14 @@ LL | //! [method@m!()]
|
|||
|
|
||||
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
|
||||
|
||||
warning: unmatched disambiguator `method` and suffix `!{}`
|
||||
--> $DIR/disambiguator-endswith-named-suffix.rs:65:6
|
||||
|
|
||||
LL | //! [method@m!{}]
|
||||
| ^^^^^^
|
||||
|
|
||||
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
|
||||
|
||||
warning: unmatched disambiguator `method` and suffix `!`
|
||||
--> $DIR/disambiguator-endswith-named-suffix.rs:68:6
|
||||
|
|
||||
|
|
@ -303,6 +391,14 @@ LL | //! [type@m!()]
|
|||
|
|
||||
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
|
||||
|
||||
warning: unmatched disambiguator `type` and suffix `!{}`
|
||||
--> $DIR/disambiguator-endswith-named-suffix.rs:77:6
|
||||
|
|
||||
LL | //! [type@m!{}]
|
||||
| ^^^^
|
||||
|
|
||||
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
|
||||
|
||||
warning: unmatched disambiguator `type` and suffix `()`
|
||||
--> $DIR/disambiguator-endswith-named-suffix.rs:79:6
|
||||
|
|
||||
|
|
@ -327,6 +423,14 @@ LL | //! [value@m!()]
|
|||
|
|
||||
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
|
||||
|
||||
warning: unmatched disambiguator `value` and suffix `!{}`
|
||||
--> $DIR/disambiguator-endswith-named-suffix.rs:83:6
|
||||
|
|
||||
LL | //! [value@m!{}]
|
||||
| ^^^^^
|
||||
|
|
||||
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
|
||||
|
||||
warning: unmatched disambiguator `value` and suffix `!`
|
||||
--> $DIR/disambiguator-endswith-named-suffix.rs:86:6
|
||||
|
|
||||
|
|
@ -351,6 +455,14 @@ LL | //! [prim@m!()]
|
|||
|
|
||||
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
|
||||
|
||||
warning: unmatched disambiguator `prim` and suffix `!{}`
|
||||
--> $DIR/disambiguator-endswith-named-suffix.rs:95:6
|
||||
|
|
||||
LL | //! [prim@m!{}]
|
||||
| ^^^^
|
||||
|
|
||||
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
|
||||
|
||||
warning: unmatched disambiguator `prim` and suffix `()`
|
||||
--> $DIR/disambiguator-endswith-named-suffix.rs:97:6
|
||||
|
|
||||
|
|
@ -375,6 +487,14 @@ LL | //! [primitive@m!()]
|
|||
|
|
||||
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
|
||||
|
||||
warning: unmatched disambiguator `primitive` and suffix `!{}`
|
||||
--> $DIR/disambiguator-endswith-named-suffix.rs:101:6
|
||||
|
|
||||
LL | //! [primitive@m!{}]
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
|
||||
|
||||
warning: unmatched disambiguator `primitive` and suffix `()`
|
||||
--> $DIR/disambiguator-endswith-named-suffix.rs:103:6
|
||||
|
|
||||
|
|
@ -391,5 +511,5 @@ LL | //! [primitive@m!]
|
|||
|
|
||||
= note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
|
||||
|
||||
warning: 46 warnings emitted
|
||||
warning: 61 warnings emitted
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ pub struct XLinkToCloneWithStartSpace;
|
|||
/// [x][struct@Clone ] //~ERROR link
|
||||
pub struct XLinkToCloneWithEndSpace;
|
||||
|
||||
/// [x][Clone\(\)] not URL-shaped enough
|
||||
/// [x][Clone\(\)] //~ERROR link
|
||||
pub struct XLinkToCloneWithEscapedParens;
|
||||
|
||||
/// [x][`Clone`] not URL-shaped enough
|
||||
|
|
|
|||
|
|
@ -123,6 +123,14 @@ 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
|
||||
|
|
||||
|
|
@ -299,5 +307,21 @@ 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
|
||||
|
||||
|
|
|
|||
|
|
@ -1,18 +1,24 @@
|
|||
//@ check-pass
|
||||
|
||||
/// [`…foo`] [`…bar`] [`Err`]
|
||||
/// [`…foo`] //~ WARN: unresolved link
|
||||
/// [`…bar`] //~ WARN: unresolved link
|
||||
/// [`Err`]
|
||||
pub struct Broken {}
|
||||
|
||||
/// [`…`] [`…`] [`Err`]
|
||||
/// [`…`] //~ WARN: unresolved link
|
||||
/// [`…`] //~ WARN: unresolved link
|
||||
/// [`Err`]
|
||||
pub struct Broken2 {}
|
||||
|
||||
/// [`…`][…] [`…`][…] [`Err`]
|
||||
/// [`…`][…] //~ WARN: unresolved link
|
||||
/// [`…`][…] //~ WARN: unresolved link
|
||||
/// [`Err`]
|
||||
pub struct Broken3 {}
|
||||
|
||||
/// […………………………][Broken3]
|
||||
pub struct Broken4 {}
|
||||
|
||||
/// [Broken3][…………………………]
|
||||
/// [Broken3][…………………………] //~ WARN: unresolved link
|
||||
pub struct Broken5 {}
|
||||
|
||||
pub struct Err;
|
||||
|
|
|
|||
59
tests/rustdoc-ui/lints/redundant_explicit_links-utf8.stderr
Normal file
59
tests/rustdoc-ui/lints/redundant_explicit_links-utf8.stderr
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
warning: unresolved link to `…foo`
|
||||
--> $DIR/redundant_explicit_links-utf8.rs:3:7
|
||||
|
|
||||
LL | /// [`…foo`]
|
||||
| ^^^^ no item named `…foo` in scope
|
||||
|
|
||||
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
|
||||
= note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default
|
||||
|
||||
warning: unresolved link to `…bar`
|
||||
--> $DIR/redundant_explicit_links-utf8.rs:4:7
|
||||
|
|
||||
LL | /// [`…bar`]
|
||||
| ^^^^ no item named `…bar` in scope
|
||||
|
|
||||
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
|
||||
|
||||
warning: unresolved link to `…`
|
||||
--> $DIR/redundant_explicit_links-utf8.rs:8:7
|
||||
|
|
||||
LL | /// [`…`]
|
||||
| ^ no item named `…` in scope
|
||||
|
|
||||
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
|
||||
|
||||
warning: unresolved link to `…`
|
||||
--> $DIR/redundant_explicit_links-utf8.rs:9:7
|
||||
|
|
||||
LL | /// [`…`]
|
||||
| ^ no item named `…` in scope
|
||||
|
|
||||
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
|
||||
|
||||
warning: unresolved link to `…`
|
||||
--> $DIR/redundant_explicit_links-utf8.rs:13:11
|
||||
|
|
||||
LL | /// [`…`][…]
|
||||
| ^ no item named `…` in scope
|
||||
|
|
||||
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
|
||||
|
||||
warning: unresolved link to `…`
|
||||
--> $DIR/redundant_explicit_links-utf8.rs:14:11
|
||||
|
|
||||
LL | /// [`…`][…]
|
||||
| ^ no item named `…` in scope
|
||||
|
|
||||
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
|
||||
|
||||
warning: unresolved link to `…………………………`
|
||||
--> $DIR/redundant_explicit_links-utf8.rs:21:15
|
||||
|
|
||||
LL | /// [Broken3][…………………………]
|
||||
| ^^^^^^^^^^ no item named `…………………………` in scope
|
||||
|
|
||||
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
|
||||
|
||||
warning: 7 warnings emitted
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue