about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-05-02 11:55:59 +0000
committerbors <bors@rust-lang.org>2024-05-02 11:55:59 +0000
commit7eb380967e868cde97ebc965d0dc9e20e29bb2f3 (patch)
treebae16623e8ad41798ee149deef5f065fbf5205c9
parent546408be416f0355a39601c1457b37727bc74395 (diff)
parentdcfc3b5de1375c6984e8d3f829d50b940e5bab07 (diff)
downloadrust-7eb380967e868cde97ebc965d0dc9e20e29bb2f3.tar.gz
rust-7eb380967e868cde97ebc965d0dc9e20e29bb2f3.zip
Auto merge of #12746 - oli-obk:bump_ui_test, r=blyxyas
Bump ui_test to 0.23

Notable changes: more control over run/rustfix/... and other rustc-specific features. All of these can in theory now be implemented entirely out of tree

changelog: none
-rw-r--r--Cargo.toml2
-rw-r--r--tests/compile-test.rs13
2 files changed, 8 insertions, 7 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 43f20ecedc2..bbd8ccb88b4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -30,7 +30,7 @@ color-print = "0.3.4"
 anstream = "0.6.0"
 
 [dev-dependencies]
-ui_test = "0.22.2"
+ui_test = "0.23"
 regex = "1.5.5"
 toml = "0.7.3"
 walkdir = "2.3"
diff --git a/tests/compile-test.rs b/tests/compile-test.rs
index 32a31f5e082..b06a11702ec 100644
--- a/tests/compile-test.rs
+++ b/tests/compile-test.rs
@@ -4,6 +4,7 @@
 #![warn(rust_2018_idioms, unused_lifetimes)]
 #![allow(unused_extern_crates)]
 
+use ui_test::custom_flags::rustfix::RustfixMode;
 use ui_test::spanned::Spanned;
 use ui_test::{status_emitter, Args, CommandBuilder, Config, Match, Mode, OutputConflictHandling};
 
@@ -122,10 +123,11 @@ fn base_config(test_dir: &str) -> (Config, Args) {
         out_dir: target_dir.join("ui_test"),
         ..Config::rustc(Path::new("tests").join(test_dir))
     };
-    config.comment_defaults.base().mode = Some(Spanned::dummy(Mode::Yolo {
-        rustfix: ui_test::RustfixMode::Everything,
-    }))
-    .into();
+    config.comment_defaults.base().mode = Some(Spanned::dummy(Mode::Yolo)).into();
+    config
+        .comment_defaults
+        .base()
+        .set_custom("rustfix", RustfixMode::Everything);
     config.comment_defaults.base().diagnostic_code_prefix = Some(Spanned::dummy("clippy::".into())).into();
     config.with_args(&args);
     let current_exe_path = env::current_exe().unwrap();
@@ -235,13 +237,12 @@ fn run_ui_cargo() {
         .push(("RUSTFLAGS".into(), Some("-Dwarnings".into())));
     // We need to do this while we still have a rustc in the `program` field.
     config.fill_host_and_target().unwrap();
-    config.dependencies_crate_manifest_path = None;
     config.program.program.set_file_name(if cfg!(windows) {
         "cargo-clippy.exe"
     } else {
         "cargo-clippy"
     });
-    config.comment_defaults.base().edition = Default::default();
+    config.comment_defaults.base().custom.clear();
 
     config
         .comment_defaults