diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-11-07 10:33:27 +0100 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2021-11-07 16:59:05 +0100 |
| commit | 5c454551dae45563e7a33da7142377cf7d8dbcbf (patch) | |
| tree | 125059dbd4347c80223b6fe7dfdf14abcba68bf8 /compiler/rustc_interface/src/passes.rs | |
| parent | 88b4ea8fb67ff5f754366157cbd98d9813253d93 (diff) | |
| download | rust-5c454551dae45563e7a33da7142377cf7d8dbcbf.tar.gz rust-5c454551dae45563e7a33da7142377cf7d8dbcbf.zip | |
more clippy fixes
Diffstat (limited to 'compiler/rustc_interface/src/passes.rs')
| -rw-r--r-- | compiler/rustc_interface/src/passes.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs index 62f5f09aa48..3f6e879e6e4 100644 --- a/compiler/rustc_interface/src/passes.rs +++ b/compiler/rustc_interface/src/passes.rs @@ -47,7 +47,7 @@ use std::ffi::OsString; use std::io::{self, BufWriter, Write}; use std::lazy::SyncLazy; use std::marker::PhantomPinned; -use std::path::PathBuf; +use std::path::{Path, PathBuf}; use std::pin::Pin; use std::rc::Rc; use std::{env, fs, iter}; @@ -536,7 +536,7 @@ where None } -fn output_contains_path(output_paths: &[PathBuf], input_path: &PathBuf) -> bool { +fn output_contains_path(output_paths: &[PathBuf], input_path: &Path) -> bool { let input_path = input_path.canonicalize().ok(); if input_path.is_none() { return false; @@ -552,7 +552,7 @@ fn output_conflicts_with_dir(output_paths: &[PathBuf]) -> Option<PathBuf> { check_output(output_paths, check) } -fn escape_dep_filename(filename: &String) -> String { +fn escape_dep_filename(filename: &str) -> String { // Apparently clang and gcc *only* escape spaces: // https://llvm.org/klaus/clang/commit/9d50634cfc268ecc9a7250226dd5ca0e945240d4 filename.replace(" ", "\\ ") |
