diff options
| author | bors <bors@rust-lang.org> | 2021-12-02 21:58:48 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-12-02 21:58:48 +0000 |
| commit | ff23ad3179014ba258f2b540fb39dd0f26852b7a (patch) | |
| tree | 205abbf762b77c2afb3e449dc31783eed1b58c00 /library/std | |
| parent | acbe4443cc4c9695c0b74a7b64b60333c990a400 (diff) | |
| parent | f7afd461c7a1e9431a3ce46c23bc7ccd233faa99 (diff) | |
| download | rust-ff23ad3179014ba258f2b540fb39dd0f26852b7a.tar.gz rust-ff23ad3179014ba258f2b540fb39dd0f26852b7a.zip | |
Auto merge of #91469 - matthiaskrgr:rollup-xom3j55, r=matthiaskrgr
Rollup of 12 pull requests Successful merges: - #89954 (Fix legacy_const_generic doc arguments display) - #91321 (Handle placeholder regions in NLL type outlive constraints) - #91329 (Fix incorrect usage of `EvaluatedToOk` when evaluating `TypeOutlives`) - #91364 (Improve error message for incorrect field accesses through raw pointers) - #91387 (Clarify and tidy up explanation of E0038) - #91410 (Move `#![feature(const_precise_live_drops)]` checks earlier in the pipeline) - #91435 (Improve diagnostic for missing half of binary operator in `if` condition) - #91444 (disable tests in Miri that take too long) - #91457 (Add additional test from rust issue number 91068) - #91460 (Document how `last_os_error` should be used) - #91464 (Document file path case sensitivity) - #91466 (Improve the comments in `Symbol::interner`.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/std')
| -rw-r--r-- | library/std/src/io/error.rs | 8 | ||||
| -rw-r--r-- | library/std/src/path.rs | 7 |
2 files changed, 14 insertions, 1 deletions
diff --git a/library/std/src/io/error.rs b/library/std/src/io/error.rs index d93c6172cfc..da88c8c9261 100644 --- a/library/std/src/io/error.rs +++ b/library/std/src/io/error.rs @@ -440,12 +440,18 @@ impl Error { /// `GetLastError` on Windows) and will return a corresponding instance of /// [`Error`] for the error code. /// + /// This should be called immediately after a call to a platform function, + /// otherwise the state of the error value is indeterminate. In particular, + /// other standard library functions may call platform functions that may + /// (or may not) reset the error value even if they succeed. + /// /// # Examples /// /// ``` /// use std::io::Error; /// - /// println!("last OS error: {:?}", Error::last_os_error()); + /// let os_error = Error::last_os_error(); + /// println!("last OS error: {:?}", os_error); /// ``` #[stable(feature = "rust1", since = "1.0.0")] #[must_use] diff --git a/library/std/src/path.rs b/library/std/src/path.rs index cf2cd5adc48..9ade2847e8e 100644 --- a/library/std/src/path.rs +++ b/library/std/src/path.rs @@ -12,6 +12,13 @@ //! [`PathBuf`]; note that the paths may differ syntactically by the //! normalization described in the documentation for the [`components`] method. //! +//! ## Case sensitivity +//! +//! Unless otherwise indicated path methods that do not access the filesystem, +//! such as [`Path::starts_with`] and [`Path::ends_with`], are case sensitive no +//! matter the platform or filesystem. An exception to this is made for Windows +//! drive letters. +//! //! ## Simple usage //! //! Path manipulation includes both parsing components from slices and building |
