We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 677bde6 commit a11d1f5Copy full SHA for a11d1f5
src/bin/miri.rs
@@ -184,10 +184,10 @@ fn main() {
184
// FIXME: Ideally we'd turn a bad build env into a compile-time error, but
185
// CTFE does not seem powerful enough for that yet.
186
if let Some(sysroot) = compile_time_sysroot() {
187
- let sysroot_flag = "--sysroot".to_string();
188
- if !rustc_args.contains(&sysroot_flag) {
+ let sysroot_flag = "--sysroot";
+ if !rustc_args.iter().any(|e| e == sysroot_flag) {
189
// We need to overwrite the default that librustc would compute.
190
- rustc_args.push(sysroot_flag);
+ rustc_args.push(sysroot_flag.to_owned());
191
rustc_args.push(sysroot);
192
}
193
0 commit comments