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.
This commit is contained in:
Joshua Nelson
2021-07-05 22:50:26 -04:00
parent 8c2b6ea37d
commit 69fe39e8a8
29 changed files with 1394 additions and 31 deletions

View File

@@ -130,6 +130,7 @@
#![feature(decl_macro)]
#![feature(doc_cfg)]
#![feature(doc_notable_trait)]
#![feature(doc_primitive)]
#![feature(exhaustive_patterns)]
#![feature(extern_types)]
#![feature(fundamental)]
@@ -355,3 +356,5 @@ pub mod arch {
/* compiler built-in */
}
}
include!("primitive_docs.rs");