|
4 | 4 | #![warn(rust_2018_idioms, unused_lifetimes)]
|
5 | 5 | #![allow(unused_extern_crates)]
|
6 | 6 |
|
| 7 | +use ui_test::custom_flags::rustfix::RustfixMode; |
7 | 8 | use ui_test::spanned::Spanned;
|
8 | 9 | use ui_test::{status_emitter, Args, CommandBuilder, Config, Match, Mode, OutputConflictHandling};
|
9 | 10 |
|
@@ -122,10 +123,11 @@ fn base_config(test_dir: &str) -> (Config, Args) {
|
122 | 123 | out_dir: target_dir.join("ui_test"),
|
123 | 124 | ..Config::rustc(Path::new("tests").join(test_dir))
|
124 | 125 | };
|
125 |
| - config.comment_defaults.base().mode = Some(Spanned::dummy(Mode::Yolo { |
126 |
| - rustfix: ui_test::RustfixMode::Everything, |
127 |
| - })) |
128 |
| - .into(); |
| 126 | + config.comment_defaults.base().mode = Some(Spanned::dummy(Mode::Yolo)).into(); |
| 127 | + config |
| 128 | + .comment_defaults |
| 129 | + .base() |
| 130 | + .set_custom("rustfix", RustfixMode::Everything); |
129 | 131 | config.comment_defaults.base().diagnostic_code_prefix = Some(Spanned::dummy("clippy::".into())).into();
|
130 | 132 | config.with_args(&args);
|
131 | 133 | let current_exe_path = env::current_exe().unwrap();
|
@@ -235,13 +237,12 @@ fn run_ui_cargo() {
|
235 | 237 | .push(("RUSTFLAGS".into(), Some("-Dwarnings".into())));
|
236 | 238 | // We need to do this while we still have a rustc in the `program` field.
|
237 | 239 | config.fill_host_and_target().unwrap();
|
238 |
| - config.dependencies_crate_manifest_path = None; |
239 | 240 | config.program.program.set_file_name(if cfg!(windows) {
|
240 | 241 | "cargo-clippy.exe"
|
241 | 242 | } else {
|
242 | 243 | "cargo-clippy"
|
243 | 244 | });
|
244 |
| - config.comment_defaults.base().edition = Default::default(); |
| 245 | + config.comment_defaults.base().custom.clear(); |
245 | 246 |
|
246 | 247 | config
|
247 | 248 | .comment_defaults
|
|
0 commit comments