diff options
| author | Martin Habovstiak <martin.habovstiak@gmail.com> | 2022-06-09 12:34:23 +0200 |
|---|---|---|
| committer | Martin Habovstiak <martin.habovstiak@gmail.com> | 2022-06-14 17:48:55 +0200 |
| commit | 56087074c655bc17af048ad6483ecf7c32ce1762 (patch) | |
| tree | c00b07a20adb9782b637db413feae58de7b8a1be /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | edab34ab2abbafc16a78daedf71dbacd2eb0b7bf (diff) | |
| download | rust-56087074c655bc17af048ad6483ecf7c32ce1762.tar.gz rust-56087074c655bc17af048ad6483ecf7c32ce1762.zip | |
Stabilize `Path::try_exists()` and improve doc
This stabilizes the `Path::try_exists()` method which returns `Result<bool, io::Error>` instead of `bool` allowing handling of errors unrelated to the file not existing. (e.g permission errors) Along with the stabilization it also: * Warns that the `exists()` method is error-prone and suggests to use the newly stabilized one. * Suggests it instead of `metadata()` to handle errors. * Mentions TOCTOU bugs to avoid false assumption that `try_exists()` is completely safe fixed version of `exists()`. * Renames the feature of still-unstable `std::fs::try_exists()` to `fs_try_exists` to avoid name conflict. The tracking issue #83186 remains open to track `fs_try_exists`.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
