From e15c62d61fa02fac93992db9297aa4a8a56cef93 Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Tue, 23 Oct 2018 23:09:44 +0200 Subject: revert making internal APIs const fn. --- src/libstd/sys_common/mutex.rs | 2 +- src/libstd/sys_common/net.rs | 6 +++--- src/libstd/sys_common/wtf8.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/libstd/sys_common') diff --git a/src/libstd/sys_common/mutex.rs b/src/libstd/sys_common/mutex.rs index dc9edb306de..c6d531c7a1a 100644 --- a/src/libstd/sys_common/mutex.rs +++ b/src/libstd/sys_common/mutex.rs @@ -80,7 +80,7 @@ impl Mutex { } // not meant to be exported to the outside world, just the containing module -pub const fn raw(mutex: &Mutex) -> &imp::Mutex { &mutex.0 } +pub fn raw(mutex: &Mutex) -> &imp::Mutex { &mutex.0 } #[must_use] /// A simple RAII utility for the above Mutex without the poisoning semantics. diff --git a/src/libstd/sys_common/net.rs b/src/libstd/sys_common/net.rs index f58c26ef428..d09a233ed89 100644 --- a/src/libstd/sys_common/net.rs +++ b/src/libstd/sys_common/net.rs @@ -199,7 +199,7 @@ impl TcpStream { Ok(TcpStream { inner: sock }) } - pub const fn socket(&self) -> &Socket { &self.inner } + pub fn socket(&self) -> &Socket { &self.inner } pub fn into_socket(self) -> Socket { self.inner } @@ -339,7 +339,7 @@ impl TcpListener { Ok(TcpListener { inner: sock }) } - pub const fn socket(&self) -> &Socket { &self.inner } + pub fn socket(&self) -> &Socket { &self.inner } pub fn into_socket(self) -> Socket { self.inner } @@ -427,7 +427,7 @@ impl UdpSocket { Ok(UdpSocket { inner: sock }) } - pub const fn socket(&self) -> &Socket { &self.inner } + pub fn socket(&self) -> &Socket { &self.inner } pub fn into_socket(self) -> Socket { self.inner } diff --git a/src/libstd/sys_common/wtf8.rs b/src/libstd/sys_common/wtf8.rs index 5f6747a1224..19ce932aa12 100644 --- a/src/libstd/sys_common/wtf8.rs +++ b/src/libstd/sys_common/wtf8.rs @@ -85,13 +85,13 @@ impl CodePoint { /// /// Since all Unicode scalar values are code points, this always succeeds. #[inline] - pub const fn from_char(value: char) -> CodePoint { + pub fn from_char(value: char) -> CodePoint { CodePoint { value: value as u32 } } /// Returns the numeric value of the code point. #[inline] - pub const fn to_u32(&self) -> u32 { + pub fn to_u32(&self) -> u32 { self.value } -- cgit 1.4.1-3-g733a5