We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07bcd4b commit 200dd77Copy full SHA for 200dd77
tests/rustdoc/intra-doc/link-to-current-crate.rs
@@ -0,0 +1,15 @@
1
+// Test to ensure that we can link to the current crate by using its name.
2
+
3
+#![deny(rustdoc::broken_intra_doc_links)]
4
+#![crate_name = "bar"]
5
6
+//@ has 'bar/index.html'
7
+//@ has - '//*[@class="docblock"]//a[@href="index.html"]' 'bar'
8
+//! [`bar`]
9
10
+pub mod foo {
11
+ //@ has 'bar/foo/fn.tadam.html'
12
+ //@ has - '//*[@class="docblock"]//a[@href="../index.html"]' 'bar'
13
+ /// [`bar`]
14
+ pub fn tadam() {}
15
+}
0 commit comments