Skip to content

Commit 88a5e1e

Browse files
Add regression test for #140026
1 parent e0437ec commit 88a5e1e

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// This test ensures that an empty associated item will not crash rustdoc.
2+
// This is a regression test for <https://github.com/rust-lang/rust/issues/140026>.
3+
4+
#[deny(rustdoc::broken_intra_doc_links)]
5+
6+
/// [`String::`]
7+
//~^ ERROR
8+
pub struct Foo;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
error: unresolved link to `String::`
2+
--> $DIR/empty-associated-items.rs:6:7
3+
|
4+
LL | /// [`String::`]
5+
| ^^^^^^^^ the struct `String` has no field or associated item named ``
6+
|
7+
note: the lint level is defined here
8+
--> $DIR/empty-associated-items.rs:4:8
9+
|
10+
LL | #[deny(rustdoc::broken_intra_doc_links)]
11+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12+
13+
error: aborting due to 1 previous error
14+

0 commit comments

Comments
 (0)