We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
path.exists()
fs::metadata(path).is_ok()
1 parent e5f83d2 commit d9a58f4Copy full SHA for d9a58f4
compiler/rustc_codegen_ssa/src/back/linker.rs
@@ -764,7 +764,7 @@ impl<'a> Linker for MsvcLinker<'a> {
764
// check to see if the file is there and just omit linking to it if it's
765
// not present.
766
let name = format!("{}.dll.lib", lib);
767
- if fs::metadata(&path.join(&name)).is_ok() {
+ if path.join(&name).exists() {
768
self.cmd.arg(name);
769
}
770
compiler/rustc_span/src/source_map.rs
@@ -109,7 +109,7 @@ pub struct RealFileLoader;
109
110
impl FileLoader for RealFileLoader {
111
fn file_exists(&self, path: &Path) -> bool {
112
- fs::metadata(path).is_ok()
+ path.exists()
113
114
115
fn read_file(&self, path: &Path) -> io::Result<String> {
0 commit comments