Skip to content

Commit

Permalink
Use CARGO_PRIMARY_PACKAGE to skip dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
fpoli committed Dec 10, 2020
1 parent ee5def9 commit c3aa699
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prusti/src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ fn main() {

// If the environment asks us to actually be rustc, then do that.
// If cargo is compiling a dependency, then be rustc.
let prusti_be_rustc = config::be_rustc()
|| arg_value(&rustc_args, "--cap-lints", |val| val == "allow").is_some();
let in_primary_package = env::var("CARGO_PRIMARY_PACKAGE").is_ok();
let prusti_be_rustc = config::be_rustc() || !in_primary_package;
if prusti_be_rustc {
rustc_driver::main();
}
Expand Down

0 comments on commit c3aa699

Please sign in to comment.