about summary refs log tree commit diff
path: root/src/test/rustdoc/no_std-primitive.rs
diff options
context:
space:
mode:
authorJoshua Nelson <jyn514@gmail.com>2021-07-10 22:25:36 -0400
committerJoshua Nelson <jyn514@gmail.com>2021-09-12 02:30:24 +0000
commitcb7e527692bd01c68f01fd373db0c49dbc8670ce (patch)
tree8f2158f843250bb3fdd44346a6d73d83849a8c76 /src/test/rustdoc/no_std-primitive.rs
parentf78acaee0372aa18ca37ebab8d919acbe997bd1c (diff)
downloadrust-cb7e527692bd01c68f01fd373db0c49dbc8670ce.tar.gz
rust-cb7e527692bd01c68f01fd373db0c49dbc8670ce.zip
Fix broken handling of primitive items
- Fix broken handling of primitive associated items
- Remove fragment hack

  Fixes 83083

- more logging
- Update CrateNum hacks

  The CrateNum has no relation to where in the dependency tree the crate
  is, only when it's loaded. Explicitly special-case core instead of
  assuming it will be the first DefId.

- Update and add tests
- Cache calculation of primitive locations

  This could possibly be avoided by passing a Cache into
  collect_intra_doc_links; but that's a much larger change, and doesn't
  seem valuable other than for this.
Diffstat (limited to 'src/test/rustdoc/no_std-primitive.rs')
-rw-r--r--src/test/rustdoc/no_std-primitive.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/rustdoc/no_std-primitive.rs b/src/test/rustdoc/no_std-primitive.rs
new file mode 100644
index 00000000000..22fd392dd36
--- /dev/null
+++ b/src/test/rustdoc/no_std-primitive.rs
@@ -0,0 +1,6 @@
+#![no_std]
+
+/// Link to [intra-doc link][u8]
+// @has 'no_std_primitive/fn.foo.html' '//a[@href="{{channel}}/core/primitive.u8.html"]' 'intra-doc link'
+// @has - '//a[@href="{{channel}}/core/primitive.u8.html"]' 'u8'
+pub fn foo() -> u8 {}