Skip to content

Commit dcfc3b5

Browse files
committed
Bump ui_test to 0.23
1 parent 852a64f commit dcfc3b5

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ color-print = "0.3.4"
3030
anstream = "0.6.0"
3131

3232
[dev-dependencies]
33-
ui_test = "0.22.2"
33+
ui_test = "0.23"
3434
regex = "1.5.5"
3535
toml = "0.7.3"
3636
walkdir = "2.3"

tests/compile-test.rs

+7-6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#![warn(rust_2018_idioms, unused_lifetimes)]
55
#![allow(unused_extern_crates)]
66

7+
use ui_test::custom_flags::rustfix::RustfixMode;
78
use ui_test::spanned::Spanned;
89
use ui_test::{status_emitter, Args, CommandBuilder, Config, Match, Mode, OutputConflictHandling};
910

@@ -122,10 +123,11 @@ fn base_config(test_dir: &str) -> (Config, Args) {
122123
out_dir: target_dir.join("ui_test"),
123124
..Config::rustc(Path::new("tests").join(test_dir))
124125
};
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);
129131
config.comment_defaults.base().diagnostic_code_prefix = Some(Spanned::dummy("clippy::".into())).into();
130132
config.with_args(&args);
131133
let current_exe_path = env::current_exe().unwrap();
@@ -235,13 +237,12 @@ fn run_ui_cargo() {
235237
.push(("RUSTFLAGS".into(), Some("-Dwarnings".into())));
236238
// We need to do this while we still have a rustc in the `program` field.
237239
config.fill_host_and_target().unwrap();
238-
config.dependencies_crate_manifest_path = None;
239240
config.program.program.set_file_name(if cfg!(windows) {
240241
"cargo-clippy.exe"
241242
} else {
242243
"cargo-clippy"
243244
});
244-
config.comment_defaults.base().edition = Default::default();
245+
config.comment_defaults.base().custom.clear();
245246

246247
config
247248
.comment_defaults

0 commit comments

Comments
 (0)