diff options
| author | Ralf Jung <post@ralfj.de> | 2023-09-03 10:23:04 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2023-09-18 08:17:36 +0200 |
| commit | 7b7caae30e2b23055f2cb686b15757904a3d840d (patch) | |
| tree | 085237150e4e96f06a3c7e97a842cf5c45cf040b /src/tools | |
| parent | df99bc151a5dcf14aa1a0768a9f370e343aac466 (diff) | |
| download | rust-7b7caae30e2b23055f2cb686b15757904a3d840d.tar.gz rust-7b7caae30e2b23055f2cb686b15757904a3d840d.zip | |
get rid of duplicate primitive_docs
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/tidy/src/lib.rs | 1 | ||||
| -rw-r--r-- | src/tools/tidy/src/main.rs | 1 | ||||
| -rw-r--r-- | src/tools/tidy/src/primitive_docs.rs | 17 |
3 files changed, 0 insertions, 19 deletions
diff --git a/src/tools/tidy/src/lib.rs b/src/tools/tidy/src/lib.rs index ca160017202..fc69c143222 100644 --- a/src/tools/tidy/src/lib.rs +++ b/src/tools/tidy/src/lib.rs @@ -63,7 +63,6 @@ pub mod features; pub mod fluent_alphabetical; pub mod mir_opt_tests; pub mod pal; -pub mod primitive_docs; pub mod rustdoc_css_themes; pub mod rustdoc_gui_tests; pub mod style; diff --git a/src/tools/tidy/src/main.rs b/src/tools/tidy/src/main.rs index 5585e125f2d..80e58ba00fc 100644 --- a/src/tools/tidy/src/main.rs +++ b/src/tools/tidy/src/main.rs @@ -112,7 +112,6 @@ fn main() { // Checks that only make sense for the std libs. check!(pal, &library_path); - check!(primitive_docs, &library_path); // Checks that need to be done for both the compiler and std libraries. check!(unit_tests, &src_path); diff --git a/src/tools/tidy/src/primitive_docs.rs b/src/tools/tidy/src/primitive_docs.rs deleted file mode 100644 index f3200e0afd7..00000000000 --- a/src/tools/tidy/src/primitive_docs.rs +++ /dev/null @@ -1,17 +0,0 @@ -//! Tidy check to make sure `library/{std,core}/src/primitive_docs.rs` are the same file. These are -//! different files so that relative links work properly without having to have `CARGO_PKG_NAME` -//! set, but conceptually they should always be the same. - -use std::path::Path; - -pub fn check(library_path: &Path, bad: &mut bool) { - let std_name = "std/src/primitive_docs.rs"; - let core_name = "core/src/primitive_docs.rs"; - let std_contents = std::fs::read_to_string(library_path.join(std_name)) - .unwrap_or_else(|e| panic!("failed to read library/{std_name}: {e}")); - let core_contents = std::fs::read_to_string(library_path.join(core_name)) - .unwrap_or_else(|e| panic!("failed to read library/{core_name}: {e}")); - if std_contents != core_contents { - tidy_error!(bad, "library/{core_name} and library/{std_name} have different contents"); - } -} |
