How to import `rustc_mir_dataflow` in rustc development? (rustc 1.70.0-nightly)

Hi,

I'm trying to build a dataflow analysis and would like to use rustc's mir dataflow analysis framework. However, as I'm using rustc 1.70.0-nightly and I'm sure the rustc-dev component has been installed, I can't use rustc_mir_dataflow in my compiler plugin since it can't be found.

error[E0432]: unresolved import `rustc_mir_dataflow`
  --> src/ffi_dataflow.rs:38:5
   |
38 | use rustc_mir_dataflow::*;
   |     ^^^^^^^^^^^^^^^^^^ use of undeclared crate or module `rustc_mir_dataflow`

Can you help me to correctly import the crate/component? Thx

You have to use extern crate rustc_mir_dataflow; to import the crate. Unlike cargo dependencies and the standard library it isn't added to the implicit prelude, so you need to explicitly import it.

OHHHHHHH, thanks I forgot it!

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.