diff options
| author | Lukas Markeffsky <@> | 2023-05-03 20:33:49 +0200 |
|---|---|---|
| committer | Lukas Markeffsky <@> | 2023-05-22 11:35:25 +0200 |
| commit | b63cc5c307e515daffae65e344848710d4ce57e2 (patch) | |
| tree | cc186374d56f583178a4eec9cbb7a58ac40f4c23 | |
| parent | cb2ba42a10a4a4d5eaac7646a25e4586c83d61f6 (diff) | |
| download | rust-b63cc5c307e515daffae65e344848710d4ce57e2.tar.gz rust-b63cc5c307e515daffae65e344848710d4ce57e2.zip | |
rustdoc: add regression test for broken link due to double backticks
| -rw-r--r-- | tests/rustdoc-ui/unescaped_backticks.rs | 12 | ||||
| -rw-r--r-- | tests/rustdoc-ui/unescaped_backticks.stderr | 14 |
2 files changed, 25 insertions, 1 deletions
diff --git a/tests/rustdoc-ui/unescaped_backticks.rs b/tests/rustdoc-ui/unescaped_backticks.rs index f1ad7c8d4c7..e99cd1f3d58 100644 --- a/tests/rustdoc-ui/unescaped_backticks.rs +++ b/tests/rustdoc-ui/unescaped_backticks.rs @@ -340,3 +340,15 @@ id! { /// level changes. pub mod tracing_macro {} } + +/// Regression test for <https://github.com/rust-lang/rust/issues/111117> +pub mod trillium_server_common { + /// One-indexed, because the first CloneCounter is included. If you don't + /// want the original to count, construct a [``CloneCounterObserver`] + /// instead and use [`CloneCounterObserver::counter`] to increment. + //~^ ERROR unescaped backtick + pub struct CloneCounter; + + /// This is used by the above. + pub struct CloneCounterObserver; +} diff --git a/tests/rustdoc-ui/unescaped_backticks.stderr b/tests/rustdoc-ui/unescaped_backticks.stderr index e629dbc34e9..bf1f18889c4 100644 --- a/tests/rustdoc-ui/unescaped_backticks.stderr +++ b/tests/rustdoc-ui/unescaped_backticks.stderr @@ -342,6 +342,18 @@ LL | | /// level changes. to this: [`rebuild_interest_cache\`][rebuild] is called after the value of the max error: unescaped backtick + --> $DIR/unescaped_backticks.rs:348:56 + | +LL | /// instead and use [`CloneCounterObserver::counter`] to increment. + | ^ + | + = help: the opening or closing backtick of an inline code may be missing +help: if you meant to use a literal backtick, escape it + | +LL | /// instead and use [`CloneCounterObserver::counter\`] to increment. + | + + +error: unescaped backtick --> $DIR/unescaped_backticks.rs:11:5 | LL | /// ` @@ -955,5 +967,5 @@ help: if you meant to use a literal backtick, escape it LL | /// | table`( | )\`body | | + -error: aborting due to 63 previous errors +error: aborting due to 64 previous errors |
