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

Document rustc_driver by default #112467

Merged
merged 1 commit into from
Jun 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/bootstrap/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ impl Step for Rustc {
/// Compiler documentation is distributed separately, so we make sure
/// we do not merge it with the other documentation from std, test and
/// proc_macros. This is largely just a wrapper around `cargo doc`.
fn run(self, builder: &Builder<'_>) {
fn run(mut self, builder: &Builder<'_>) {
let stage = self.stage;
let target = self.target;

Expand Down Expand Up @@ -725,6 +725,11 @@ impl Step for Rustc {
cargo.rustdocflag("ena=https://docs.rs/ena/latest/");

let mut to_open = None;

if self.crates.is_empty() {
self.crates = INTERNER.intern_list(vec!["rustc_driver".to_owned()]);
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I'm not quite sure this is correct. It will document only rustc_driver, not any of its dependencies. I think this should be crates = builder.crate_dependencies(rustc_driver) or something like that.


for krate in &*self.crates {
// Create all crate output directories first to make sure rustdoc uses
// relative links.
Expand Down