Update src/tools/compiletest/src/runtest.rs

Co-authored-by: Mark Rousskov <mark.simulacrum@gmail.com>
This commit is contained in:
Andrew Pollack 2022-10-24 08:48:13 -07:00 committed by GitHub
parent 47703d3f3d
commit f01608cbc4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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<String>) {