diff options
| author | Jeremy Stucki <jeremy@myelin.ch> | 2019-06-25 19:36:30 +0200 |
|---|---|---|
| committer | Jeremy Stucki <stucki.jeremy@gmail.com> | 2019-07-03 10:01:03 +0200 |
| commit | 88c515da0728a3a3738be6ffa96168d060243225 (patch) | |
| tree | f7c3edd82cf04d10e02275af0a2f5278a3628def /src/libstd/sys | |
| parent | edcde7025c928de35e8635c6725b20ce91dc241d (diff) | |
| download | rust-88c515da0728a3a3738be6ffa96168d060243225.tar.gz rust-88c515da0728a3a3738be6ffa96168d060243225.zip | |
Revert changes to the standard library
Moved to its own PR
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/redox/ext/net.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/unix/ext/net.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/windows/mod.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/windows/path.rs | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/src/libstd/sys/redox/ext/net.rs b/src/libstd/sys/redox/ext/net.rs index e25bab4ff61..b3ef5f3064c 100644 --- a/src/libstd/sys/redox/ext/net.rs +++ b/src/libstd/sys/redox/ext/net.rs @@ -673,7 +673,7 @@ impl UnixListener { /// } /// ``` #[stable(feature = "unix_socket_redox", since = "1.29.0")] - pub fn incoming(&self) -> Incoming { + pub fn incoming<'a>(&'a self) -> Incoming<'a> { Incoming { listener: self } } } diff --git a/src/libstd/sys/unix/ext/net.rs b/src/libstd/sys/unix/ext/net.rs index a9b8bc6a962..41090caee84 100644 --- a/src/libstd/sys/unix/ext/net.rs +++ b/src/libstd/sys/unix/ext/net.rs @@ -894,7 +894,7 @@ impl UnixListener { /// } /// ``` #[stable(feature = "unix_socket", since = "1.10.0")] - pub fn incoming(&self) -> Incoming<'_> { + pub fn incoming<'a>(&'a self) -> Incoming<'a> { Incoming { listener: self } } } diff --git a/src/libstd/sys/windows/mod.rs b/src/libstd/sys/windows/mod.rs index 36fb1fb5ff6..1cb55539129 100644 --- a/src/libstd/sys/windows/mod.rs +++ b/src/libstd/sys/windows/mod.rs @@ -195,7 +195,7 @@ fn wide_char_to_multi_byte(code_page: u32, } } -pub fn truncate_utf16_at_nul(v: &[u16]) -> &[u16] { +pub fn truncate_utf16_at_nul<'a>(v: &'a [u16]) -> &'a [u16] { match v.iter().position(|c| *c == 0) { // don't include the 0 Some(i) => &v[..i], diff --git a/src/libstd/sys/windows/path.rs b/src/libstd/sys/windows/path.rs index 7eae28cb14f..f3178a5e9e6 100644 --- a/src/libstd/sys/windows/path.rs +++ b/src/libstd/sys/windows/path.rs @@ -19,7 +19,7 @@ pub fn is_verbatim_sep(b: u8) -> bool { b == b'\\' } -pub fn parse_prefix(path: &OsStr) -> Option<Prefix<'_>> { +pub fn parse_prefix<'a>(path: &'a OsStr) -> Option<Prefix<'a>> { use crate::path::Prefix::*; unsafe { // The unsafety here stems from converting between &OsStr and &[u8] |
