Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only check the compiler and standard library before documenting them (take 2) #95450

Merged
merged 1 commit into from
Apr 16, 2022

Commits on Apr 15, 2022

  1. Don't build the library and standard library before documenting them

    Rustdoc doesn't require the build artifacts to generate the docs, and
    especially in the case of rustc, it greatly increases the time needed to
    run the build.
    
    - Statically ensure that only the top_stage of a tool is documented
    
    If another part of rustbuild tried to document a different stage, it
    would run into errors because `check::Rustc` unconditionally uses the
    top stage.
    
    - Try building rustc instead of checking to avoid duplicate artifacts
    
    Tries to workaround the following error:
    ```
    error[E0464]: multiple matching crates for `rustc_ast`
      --> src/librustdoc/lib.rs:40:1
       |
    40 | extern crate rustc_ast;
       | ^^^^^^^^^^^^^^^^^^^^^^^
       |
       = note: candidates:
               crate `rustc_ast`: /checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_ast-6d7c193782263d89.rlib
               crate `rustc_ast`: /checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_ast-e5d09eda5beb759c.rmeta
    ```
    jyn514 committed Apr 15, 2022
    Configuration menu
    Copy the full SHA
    dd0ad73 View commit details
    Browse the repository at this point in the history