Skip to content

Commit db9bb02

Browse files
authored
Merge pull request #2844 from rust-lang/aj/rustc-internals-docs-clarity
Mentions rustc-docs for rustc_private
2 parents 1d2a484 + 7016ffb commit db9bb02

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

src/rustc-driver/external-rustc-drivers.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,22 @@ When developing out-of-tree projects that use `rustc_private` crates, you can co
7171

7272
This configuration allows `rust-analyzer` to properly recognize and provide IDE support for `rustc_private` crates in out-of-tree projects.
7373

74-
### Getting Specific Nightly Documentation for `rustc_private`
74+
### Getting Nightly Documentation for `rustc_private`
7575

76-
The nightly-rustc internal crates' documentation is only available for the latest nightly. If you depend on compiler internals from an older nightly, you may want to refer to the internal documentation from that particular nightly. The only way to do this is to generate the documentation locally. For example, to get documentation for `nightly-2025-11-08`:
76+
#### Latest Nightly
77+
78+
For the latest nightly, you can install the `rustc-docs` component and open it directly in your browser:
79+
80+
```sh
81+
rustup component add rustc-docs
82+
rustup doc --rustc-docs
83+
```
84+
85+
> Note: The `rustc-docs` component is only available for recent nightly toolchains and may not be present for every nightly date. It was first introduced in [PR #75560](https://github.com/rust-lang/rust/pull/75560) (August 2020).
86+
87+
#### Older Nightlies
88+
89+
If you depend on compiler internals from an older nightly, you may want to refer to the internal documentation from that particular nightly. The only way to do this is to generate the documentation locally. For example, to get documentation for `nightly-2025-11-08`:
7790

7891
Get the Git commit hash for that nightly:
7992

0 commit comments

Comments
 (0)