Skip to content

Latest nightly not able to find extern crate rustc_mir. #88974

New issue

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

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

Already on GitHub? # to your account

Closed
Lee-Janggun opened this issue Sep 15, 2021 · 2 comments
Closed

Latest nightly not able to find extern crate rustc_mir. #88974

Lee-Janggun opened this issue Sep 15, 2021 · 2 comments
Labels
C-bug Category: This is a bug.

Comments

@Lee-Janggun
Copy link
Contributor

Lee-Janggun commented Sep 15, 2021

The latest nightly is not able to find the compiler crate rustc_mir for some reason.

Code:

#![feature(rustc_private)]

extern crate rustc_mir;

fn main() {
}

Toolchain:

[toolchain]
channel = "nightly"
components = [ "rustc-dev", "llvm-tools-preview" ]

Platform: x86_64 Linux.

The above code fails to compile with cargo build, resulting in the following error message.

error[E0463]: can't find crate for `rustc_mir`
 --> src/main.rs:3:1
  |
3 | extern crate rustc_mir;
  | ^^^^^^^^^^^^^^^^^^^^^^^ can't find crate
  |
  = help: maybe you need to install the missing components with: `rustup component add rust-src rustc-dev llvm-tools-preview`

The code compiles fine with nightly-2021-08-30, and after doing a manual search, I can confirm that problem occurs from nightly-2021-09-09. nightly-2021-09-08 works fine.

I do not know if other rustc crates suffer from the same problem. I used the above minimal example during search for ease.

I came across this bug when I was trying to compile this test case locally.

@Lee-Janggun Lee-Janggun added the C-bug Category: This is a bug. label Sep 15, 2021
@tmiasko
Copy link
Contributor

tmiasko commented Sep 15, 2021

The rustc_mir was split into smaller crates in #80522.

@Lee-Janggun
Copy link
Contributor Author

Thank you very much for the quick reply!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

3 participants