about summary refs log tree commit diff
path: root/src/test/rustdoc/primitive
diff options
context:
space:
mode:
authorJoshua Nelson <jyn514@gmail.com>2021-07-05 22:50:26 -0400
committerJoshua Nelson <jyn514@gmail.com>2021-09-12 02:23:08 +0000
commit69fe39e8a8e6a66d97836e3068a4b1f183c79ea6 (patch)
treeef123baaa1c9db0d8dfc066526e11e2df0da11ff /src/test/rustdoc/primitive
parent8c2b6ea37d7719a0370bd404030eef9702c1752c (diff)
downloadrust-69fe39e8a8e6a66d97836e3068a4b1f183c79ea6.tar.gz
rust-69fe39e8a8e6a66d97836e3068a4b1f183c79ea6.zip
Add primitive documentation to libcore
This works by doing two things:
- Adding links that are specific to the crate. Since not all primitive
  items are defined in `core` (due to lang_items), these need to use
  relative links and not intra-doc links.
- Duplicating `primitive_docs` in both core and std. This allows not needing CARGO_PKG_NAME to build the standard library. It also adds a tidy check to make sure they stay the same.
Diffstat (limited to 'src/test/rustdoc/primitive')
-rw-r--r--src/test/rustdoc/primitive/no_std.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/rustdoc/primitive/no_std.rs b/src/test/rustdoc/primitive/no_std.rs
new file mode 100644
index 00000000000..8d05a8e6e01
--- /dev/null
+++ b/src/test/rustdoc/primitive/no_std.rs
@@ -0,0 +1,5 @@
+#![no_std]
+
+// @has no_std/fn.foo.html '//a/[@href="{{channel}}/core/primitive.u8.html"]' 'u8'
+// Link to [u8]
+pub fn foo() -> u8 {}