about summary refs log tree commit diff
path: root/src/libstd/sys_common
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2018-10-23 23:09:44 +0200
committerMazdak Farrokhzad <twingoow@gmail.com>2018-11-10 01:10:07 +0100
commite15c62d61fa02fac93992db9297aa4a8a56cef93 (patch)
tree7f1e21f22c66f3d4988fdbf347031bd6d67a3af0 /src/libstd/sys_common
parentd1d2aa22c0d15465af1daccdb3821450c98d0ed0 (diff)
downloadrust-e15c62d61fa02fac93992db9297aa4a8a56cef93.tar.gz
rust-e15c62d61fa02fac93992db9297aa4a8a56cef93.zip
revert making internal APIs const fn.
Diffstat (limited to 'src/libstd/sys_common')
-rw-r--r--src/libstd/sys_common/mutex.rs2
-rw-r--r--src/libstd/sys_common/net.rs6
-rw-r--r--src/libstd/sys_common/wtf8.rs4
3 files changed, 6 insertions, 6 deletions
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
     }