diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2022-06-20 07:37:41 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-20 07:37:41 +0900 |
| commit | 77316a4aaa0029481397ff2e43f57e60d5226569 (patch) | |
| tree | c0ad6c9c6fcd2a75ead6bf863b42ca65e59a3788 /compiler/rustc_error_messages/src | |
| parent | 9d4e08e725592a703b9846a8421ff5eed0aff3c3 (diff) | |
| parent | 56087074c655bc17af048ad6483ecf7c32ce1762 (diff) | |
| download | rust-77316a4aaa0029481397ff2e43f57e60d5226569.tar.gz rust-77316a4aaa0029481397ff2e43f57e60d5226569.zip | |
Rollup merge of #97912 - Kixunil:stabilize_path_try_exists, r=dtolnay
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_error_messages/src')
| -rw-r--r-- | compiler/rustc_error_messages/src/lib.rs | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/compiler/rustc_error_messages/src/lib.rs b/compiler/rustc_error_messages/src/lib.rs index fefcaa898c1..ba7cc4908b8 100644 --- a/compiler/rustc_error_messages/src/lib.rs +++ b/compiler/rustc_error_messages/src/lib.rs @@ -1,6 +1,5 @@ #![feature(let_chains)] #![feature(once_cell)] -#![feature(path_try_exists)] #![feature(rustc_attrs)] #![feature(type_alias_impl_trait)] |
