Skip to content

Rustdoc does not apply cfg(parallel_compiler) when bootstrapping #82301

Description

@cjgillot

Found while testing #70951.

I tried this code:

In rustc_middle:

pub trait QueryEngine {
  #[cfg(parallel_compiler)]
  unsafe fn deadlock();
}

In downstream crate rustc_query_system:

impl QueryEngine for QueryCtxt {
  #[cfg(parallel_compiler)]
  unsafe fn deadlock() {}
}

I expected to see this happen: rustdoc run successfully.

Instead, this happened: rustdoc complains of missing impl-item deadlock.

My understanding is that ./x.py check compiles with parallel_compiler = true and
puts the trait with deadcode in its metadata.
Rustdoc tries to document ignoring parallel_compiler,
so the function deadcode is missing.

Meta

master at 8599bff

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions