Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
rustdoc: add regression test for broken link due to double backticks
  • Loading branch information
Lukas Markeffsky committed May 22, 2023
commit b63cc5c307e515daffae65e344848710d4ce57e2
12 changes: 12 additions & 0 deletions tests/rustdoc-ui/unescaped_backticks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
14 changes: 13 additions & 1 deletion tests/rustdoc-ui/unescaped_backticks.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,18 @@ LL | | /// level changes.
change: [`rebuild_interest_cache`][rebuild] is called after the value of the max
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
|
Expand Down Expand Up @@ -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