about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/collections/hash/map.rs4
-rw-r--r--src/libstd/collections/hash/table.rs12
-rw-r--r--src/libstd/ffi/c_str.rs4
-rw-r--r--src/libstd/sync/mpsc/mod.rs2
-rw-r--r--src/libstd/sync/mpsc/oneshot.rs2
-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
8 files changed, 18 insertions, 18 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs
index c18f200872d..8de415e8aed 100644
--- a/src/libstd/collections/hash/map.rs
+++ b/src/libstd/collections/hash/map.rs
@@ -36,7 +36,7 @@ struct DefaultResizePolicy;
 
 impl DefaultResizePolicy {
     #[inline]
-    const fn new() -> DefaultResizePolicy {
+    fn new() -> DefaultResizePolicy {
         DefaultResizePolicy
     }
 
@@ -69,7 +69,7 @@ impl DefaultResizePolicy {
 
     /// The capacity of the given raw capacity.
     #[inline]
-    const fn capacity(&self, raw_cap: usize) -> usize {
+    fn capacity(&self, raw_cap: usize) -> usize {
         // This doesn't have to be checked for overflow since allocation size
         // in bytes will overflow earlier than multiplication by 10.
         //
diff --git a/src/libstd/collections/hash/table.rs b/src/libstd/collections/hash/table.rs
index 0df20395b01..547f97cc8ac 100644
--- a/src/libstd/collections/hash/table.rs
+++ b/src/libstd/collections/hash/table.rs
@@ -247,7 +247,7 @@ impl<K, V> RawBucket<K, V> {
 // Buckets hold references to the table.
 impl<K, V, M> FullBucket<K, V, M> {
     /// Borrow a reference to the table.
-    pub const fn table(&self) -> &M {
+    pub fn table(&self) -> &M {
         &self.table
     }
     /// Borrow a mutable reference to the table.
@@ -259,18 +259,18 @@ impl<K, V, M> FullBucket<K, V, M> {
         self.table
     }
     /// Get the raw index.
-    pub const fn index(&self) -> usize {
+    pub fn index(&self) -> usize {
         self.raw.idx
     }
     /// Get the raw bucket.
-    pub const fn raw(&self) -> RawBucket<K, V> {
+    pub fn raw(&self) -> RawBucket<K, V> {
         self.raw
     }
 }
 
 impl<K, V, M> EmptyBucket<K, V, M> {
     /// Borrow a reference to the table.
-    pub const fn table(&self) -> &M {
+    pub fn table(&self) -> &M {
         &self.table
     }
     /// Borrow a mutable reference to the table.
@@ -281,7 +281,7 @@ impl<K, V, M> EmptyBucket<K, V, M> {
 
 impl<K, V, M> Bucket<K, V, M> {
     /// Get the raw index.
-    pub const fn index(&self) -> usize {
+    pub fn index(&self) -> usize {
         self.raw.idx
     }
     /// get the table.
@@ -772,7 +772,7 @@ impl<K, V> RawTable<K, V> {
 
     /// The number of elements ever `put` in the hashtable, minus the number
     /// of elements ever `take`n.
-    pub const fn size(&self) -> usize {
+    pub fn size(&self) -> usize {
         self.size
     }
 
diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs
index e2dc02e40bf..cb914539985 100644
--- a/src/libstd/ffi/c_str.rs
+++ b/src/libstd/ffi/c_str.rs
@@ -265,12 +265,12 @@ enum FromBytesWithNulErrorKind {
 }
 
 impl FromBytesWithNulError {
-    const fn interior_nul(pos: usize) -> FromBytesWithNulError {
+    fn interior_nul(pos: usize) -> FromBytesWithNulError {
         FromBytesWithNulError {
             kind: FromBytesWithNulErrorKind::InteriorNul(pos),
         }
     }
-    const fn not_nul_terminated() -> FromBytesWithNulError {
+    fn not_nul_terminated() -> FromBytesWithNulError {
         FromBytesWithNulError {
             kind: FromBytesWithNulErrorKind::NotNulTerminated,
         }
diff --git a/src/libstd/sync/mpsc/mod.rs b/src/libstd/sync/mpsc/mod.rs
index b726168c7c6..059ced4f56e 100644
--- a/src/libstd/sync/mpsc/mod.rs
+++ b/src/libstd/sync/mpsc/mod.rs
@@ -785,7 +785,7 @@ pub fn sync_channel<T>(bound: usize) -> (SyncSender<T>, Receiver<T>) {
 ////////////////////////////////////////////////////////////////////////////////
 
 impl<T> Sender<T> {
-    const fn new(inner: Flavor<T>) -> Sender<T> {
+    fn new(inner: Flavor<T>) -> Sender<T> {
         Sender {
             inner: UnsafeCell::new(inner),
         }
diff --git a/src/libstd/sync/mpsc/oneshot.rs b/src/libstd/sync/mpsc/oneshot.rs
index 273644cb902..b8e50c9297b 100644
--- a/src/libstd/sync/mpsc/oneshot.rs
+++ b/src/libstd/sync/mpsc/oneshot.rs
@@ -89,7 +89,7 @@ enum MyUpgrade<T> {
 }
 
 impl<T> Packet<T> {
-    pub const fn new() -> Packet<T> {
+    pub fn new() -> Packet<T> {
         Packet {
             data: UnsafeCell::new(None),
             upgrade: UnsafeCell::new(NothingSent),
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
     }