about summary refs log tree commit diff
path: root/tests/rustdoc-ui
diff options
context:
space:
mode:
authorbinarycat <binarycat@envs.net>2025-04-18 17:15:11 -0500
committerbinarycat <binarycat@envs.net>2025-07-24 11:17:14 -0500
commit041348110e2e526a80efd5adfc2909c716cbb37f (patch)
tree942e8d13b43d4c5f39cca1941b0e486b8258efc1 /tests/rustdoc-ui
parenta7da4b829d328f129e342917908b70c5f4b98abc (diff)
downloadrust-041348110e2e526a80efd5adfc2909c716cbb37f.tar.gz
rust-041348110e2e526a80efd5adfc2909c716cbb37f.zip
rustdoc: update tests to match new lint behavior
Diffstat (limited to 'tests/rustdoc-ui')
-rw-r--r--tests/rustdoc-ui/bad-intra-doc.rs2
-rw-r--r--tests/rustdoc-ui/intra-doc/weird-syntax.rs2
-rw-r--r--tests/rustdoc-ui/intra-doc/weird-syntax.stderr24
3 files changed, 3 insertions, 25 deletions
diff --git a/tests/rustdoc-ui/bad-intra-doc.rs b/tests/rustdoc-ui/bad-intra-doc.rs
index 7bc55756e67..c24a848d898 100644
--- a/tests/rustdoc-ui/bad-intra-doc.rs
+++ b/tests/rustdoc-ui/bad-intra-doc.rs
@@ -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;
diff --git a/tests/rustdoc-ui/intra-doc/weird-syntax.rs b/tests/rustdoc-ui/intra-doc/weird-syntax.rs
index 1c5977b1bc3..9f18f67fc44 100644
--- a/tests/rustdoc-ui/intra-doc/weird-syntax.rs
+++ b/tests/rustdoc-ui/intra-doc/weird-syntax.rs
@@ -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
diff --git a/tests/rustdoc-ui/intra-doc/weird-syntax.stderr b/tests/rustdoc-ui/intra-doc/weird-syntax.stderr
index 3a567e409ef..ad813f0f9b6 100644
--- a/tests/rustdoc-ui/intra-doc/weird-syntax.stderr
+++ b/tests/rustdoc-ui/intra-doc/weird-syntax.stderr
@@ -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