about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/compile-test.rs8
-rw-r--r--tests/ui/to_string_in_format_args_incremental.fixed11
-rw-r--r--tests/ui/to_string_in_format_args_incremental.rs11
-rw-r--r--tests/ui/to_string_in_format_args_incremental.stderr11
4 files changed, 4 insertions, 37 deletions
diff --git a/tests/compile-test.rs b/tests/compile-test.rs
index 78b27e2f613..99a01257a7b 100644
--- a/tests/compile-test.rs
+++ b/tests/compile-test.rs
@@ -273,10 +273,10 @@ fn run_ui_cargo(cx: &TestContext) {
     config.program.input_file_flag = CommandBuilder::cargo().input_file_flag;
     config.program.out_dir_flag = CommandBuilder::cargo().out_dir_flag;
     config.program.args = vec!["clippy".into(), "--color".into(), "never".into(), "--quiet".into()];
-    config
-        .program
-        .envs
-        .push(("RUSTFLAGS".into(), Some("-Dwarnings".into())));
+    config.program.envs.extend([
+        ("RUSTFLAGS".into(), Some("-Dwarnings".into())),
+        ("CARGO_INCREMENTAL".into(), Some("0".into())),
+    ]);
     // We need to do this while we still have a rustc in the `program` field.
     config.fill_host_and_target().unwrap();
     config.program.program.set_file_name(if cfg!(windows) {
diff --git a/tests/ui/to_string_in_format_args_incremental.fixed b/tests/ui/to_string_in_format_args_incremental.fixed
deleted file mode 100644
index 98b028c15fd..00000000000
--- a/tests/ui/to_string_in_format_args_incremental.fixed
+++ /dev/null
@@ -1,11 +0,0 @@
-//@compile-flags: -C incremental=target/debug/test/incr
-
-#![allow(clippy::uninlined_format_args)]
-
-// see https://github.com/rust-lang/rust-clippy/issues/10969
-
-fn main() {
-    let s = "Hello, world!";
-    println!("{}", s);
-    //~^ to_string_in_format_args
-}
diff --git a/tests/ui/to_string_in_format_args_incremental.rs b/tests/ui/to_string_in_format_args_incremental.rs
deleted file mode 100644
index a5ebe4b0327..00000000000
--- a/tests/ui/to_string_in_format_args_incremental.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-//@compile-flags: -C incremental=target/debug/test/incr
-
-#![allow(clippy::uninlined_format_args)]
-
-// see https://github.com/rust-lang/rust-clippy/issues/10969
-
-fn main() {
-    let s = "Hello, world!";
-    println!("{}", s.to_string());
-    //~^ to_string_in_format_args
-}
diff --git a/tests/ui/to_string_in_format_args_incremental.stderr b/tests/ui/to_string_in_format_args_incremental.stderr
deleted file mode 100644
index 62178cc0cfb..00000000000
--- a/tests/ui/to_string_in_format_args_incremental.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error: `to_string` applied to a type that implements `Display` in `println!` args
-  --> tests/ui/to_string_in_format_args_incremental.rs:9:21
-   |
-LL |     println!("{}", s.to_string());
-   |                     ^^^^^^^^^^^^ help: remove this
-   |
-   = note: `-D clippy::to-string-in-format-args` implied by `-D warnings`
-   = help: to override `-D warnings` add `#[allow(clippy::to_string_in_format_args)]`
-
-error: aborting due to 1 previous error
-