Skip to content
This repository was archived by the owner on Nov 24, 2023. It is now read-only.

Commit fe2526e

Browse files
committed
WIP: Trigger 2018 breakage lints
Fix env var name, list explicit allow lints I'd like to have a way to disable all lints and than individually enable the breakage lint group, but sadly `-A warnings -D rust-2018-breakage` doesn't seem to work. So, let's list the default lint groups for now.
1 parent bb18250 commit fe2526e

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

cargo-fix/src/cli.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ pub fn run() -> Result<(), Error> {
8888
info!("edition upgrade? {:?}", matches.value_of("edition"));
8989
if let Some("2018") = matches.value_of("edition") {
9090
info!("edition upgrade!");
91-
let mut rustc_flags = env::var_os("RUSTC_FLAGS").unwrap_or_else(|| "".into());
92-
rustc_flags.push("-A warnings -W rust_2018_breakage");
93-
cmd.env("RUSTC_FLAGS", &rustc_flags);
91+
let mut rustc_flags = env::var_os("RUSTFLAGS").unwrap_or_else(|| "".into());
92+
rustc_flags.push("-W rust-2018-breakage -A unused -A nonstandard-style -A bad-style");
93+
cmd.env("RUSTFLAGS", &rustc_flags);
9494
}
9595

9696
// An now execute all of Cargo! This'll fix everything along the way.

cargo-fix/tests/all/edition_upgrade.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ fn prepare_for_2018() {
1414
r#"
1515
#![allow(unused)]
1616
#![feature(crate_in_paths)]
17-
#![warn(absolute_path_starting_with_module)]
1817
1918
mod foo {
2019
pub const FOO: &str = "fooo";

0 commit comments

Comments
 (0)