File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
tests/rustdoc-ui/intra-doc Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change
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 number Diff line number Diff line change
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
+
You can’t perform that action at this time.
0 commit comments