From f01608cbc41783710dd1909707d74d720c2b6cf8 Mon Sep 17 00:00:00 2001 From: Andrew Pollack Date: Mon, 24 Oct 2022 08:48:13 -0700 Subject: [PATCH] Update src/tools/compiletest/src/runtest.rs Co-authored-by: Mark Rousskov --- src/tools/compiletest/src/runtest.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 3068f3c5b0b0c..8af5f1da694b9 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -1184,7 +1184,7 @@ impl<'test> TestCx<'test> { // Remove options that are either unwanted (-O) or may lead to duplicates due to RUSTFLAGS. let options_to_remove = ["-O".to_owned(), "-g".to_owned(), "--debuginfo".to_owned()]; - options.to_vec().into_iter().filter(|x| !options_to_remove.contains(x)).collect() + options.iter().filter(|x| !options_to_remove.contains(x)).map(|x| x.clone()).collect() } fn maybe_add_external_args(&self, cmd: &mut Command, args: &Vec) {