about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/liballoc/collections/binary_heap.rs2
-rw-r--r--src/liballoc/collections/btree/node.rs2
-rw-r--r--src/liballoc/collections/linked_list.rs2
-rw-r--r--src/liballoc/collections/vec_deque.rs2
-rw-r--r--src/liballoc/raw_vec.rs4
-rw-r--r--src/libcore/alloc.rs2
-rw-r--r--src/libcore/array.rs2
-rw-r--r--src/libcore/benches/iter.rs2
-rw-r--r--src/libcore/cell.rs4
-rw-r--r--src/libcore/fmt/mod.rs4
-rw-r--r--src/libcore/iter/mod.rs2
-rw-r--r--src/libcore/num/dec2flt/mod.rs4
-rw-r--r--src/libcore/num/dec2flt/parse.rs2
-rw-r--r--src/libcore/num/dec2flt/rawfp.rs2
-rw-r--r--src/libcore/num/flt2dec/estimator.rs2
-rw-r--r--src/libcore/ptr.rs2
-rw-r--r--src/libcore/slice/memchr.rs6
-rw-r--r--src/libcore/slice/mod.rs2
-rw-r--r--src/libcore/str/mod.rs8
-rw-r--r--src/libcore/unicode/bool_trie.rs2
-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
28 files changed, 47 insertions, 47 deletions
diff --git a/src/liballoc/collections/binary_heap.rs b/src/liballoc/collections/binary_heap.rs
index e7e741dea4c..fcadcb544c4 100644
--- a/src/liballoc/collections/binary_heap.rs
+++ b/src/liballoc/collections/binary_heap.rs
@@ -884,7 +884,7 @@ impl<'a, T> Hole<'a, T> {
     }
 
     #[inline]
-    const fn pos(&self) -> usize {
+    fn pos(&self) -> usize {
         self.pos
     }
 
diff --git a/src/liballoc/collections/btree/node.rs b/src/liballoc/collections/btree/node.rs
index 10665b8e463..deca9591fbd 100644
--- a/src/liballoc/collections/btree/node.rs
+++ b/src/liballoc/collections/btree/node.rs
@@ -357,7 +357,7 @@ impl<BorrowType, K, V, Type> NodeRef<BorrowType, K, V, Type> {
 
     /// Returns the height of this node in the whole tree. Zero height denotes the
     /// leaf level.
-    pub const fn height(&self) -> usize {
+    pub fn height(&self) -> usize {
         self.height
     }
 
diff --git a/src/liballoc/collections/linked_list.rs b/src/liballoc/collections/linked_list.rs
index 9b2975b81a3..3d66b9f54da 100644
--- a/src/liballoc/collections/linked_list.rs
+++ b/src/liballoc/collections/linked_list.rs
@@ -135,7 +135,7 @@ impl<T: fmt::Debug> fmt::Debug for IntoIter<T> {
 }
 
 impl<T> Node<T> {
-    const fn new(element: T) -> Self {
+    fn new(element: T) -> Self {
         Node {
             next: None,
             prev: None,
diff --git a/src/liballoc/collections/vec_deque.rs b/src/liballoc/collections/vec_deque.rs
index e0ae7561d45..88e76033f27 100644
--- a/src/liballoc/collections/vec_deque.rs
+++ b/src/liballoc/collections/vec_deque.rs
@@ -1275,7 +1275,7 @@ impl<T> VecDeque<T> {
     }
 
     #[inline]
-    const fn is_contiguous(&self) -> bool {
+    fn is_contiguous(&self) -> bool {
         self.tail <= self.head
     }
 
diff --git a/src/liballoc/raw_vec.rs b/src/liballoc/raw_vec.rs
index 0b6f400a403..837770feece 100644
--- a/src/liballoc/raw_vec.rs
+++ b/src/liballoc/raw_vec.rs
@@ -204,7 +204,7 @@ impl<T, A: Alloc> RawVec<T, A> {
     /// Gets a raw pointer to the start of the allocation. Note that this is
     /// Unique::empty() if `cap = 0` or T is zero-sized. In the former case, you must
     /// be careful.
-    pub const fn ptr(&self) -> *mut T {
+    pub fn ptr(&self) -> *mut T {
         self.ptr.as_ptr()
     }
 
@@ -221,7 +221,7 @@ impl<T, A: Alloc> RawVec<T, A> {
     }
 
     /// Returns a shared reference to the allocator backing this RawVec.
-    pub const fn alloc(&self) -> &A {
+    pub fn alloc(&self) -> &A {
         &self.a
     }
 
diff --git a/src/libcore/alloc.rs b/src/libcore/alloc.rs
index 045fabca268..113a85abecb 100644
--- a/src/libcore/alloc.rs
+++ b/src/libcore/alloc.rs
@@ -25,7 +25,7 @@ use num::NonZeroUsize;
 #[derive(Debug)]
 pub struct Excess(pub NonNull<u8>, pub usize);
 
-const fn size_align<T>() -> (usize, usize) {
+fn size_align<T>() -> (usize, usize) {
     (mem::size_of::<T>(), mem::align_of::<T>())
 }
 
diff --git a/src/libcore/array.rs b/src/libcore/array.rs
index 0bea541e163..3d24f8902bd 100644
--- a/src/libcore/array.rs
+++ b/src/libcore/array.rs
@@ -77,7 +77,7 @@ impl TryFromSliceError {
            issue = "0")]
     #[inline]
     #[doc(hidden)]
-    pub const fn __description(&self) -> &str {
+    pub fn __description(&self) -> &str {
         "could not convert slice to array"
     }
 }
diff --git a/src/libcore/benches/iter.rs b/src/libcore/benches/iter.rs
index c8b8c2eff97..6c597301ac2 100644
--- a/src/libcore/benches/iter.rs
+++ b/src/libcore/benches/iter.rs
@@ -39,7 +39,7 @@ fn bench_multiple_take(b: &mut Bencher) {
     });
 }
 
-const fn scatter(x: i32) -> i32 { (x * 31) % 127 }
+fn scatter(x: i32) -> i32 { (x * 31) % 127 }
 
 #[bench]
 fn bench_max_by_key(b: &mut Bencher) {
diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs
index 3fe77fe688f..9cf42eff219 100644
--- a/src/libcore/cell.rs
+++ b/src/libcore/cell.rs
@@ -636,12 +636,12 @@ type BorrowFlag = isize;
 const UNUSED: BorrowFlag = 0;
 
 #[inline(always)]
-const fn is_writing(x: BorrowFlag) -> bool {
+fn is_writing(x: BorrowFlag) -> bool {
     x < UNUSED
 }
 
 #[inline(always)]
-const fn is_reading(x: BorrowFlag) -> bool {
+fn is_reading(x: BorrowFlag) -> bool {
     x > UNUSED
 }
 
diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs
index 4fde4e79ee2..284617a4167 100644
--- a/src/libcore/fmt/mod.rs
+++ b/src/libcore/fmt/mod.rs
@@ -1703,11 +1703,11 @@ impl<'a> Formatter<'a> {
 
     // FIXME: Decide what public API we want for these two flags.
     // https://github.com/rust-lang/rust/issues/48584
-    const fn debug_lower_hex(&self) -> bool {
+    fn debug_lower_hex(&self) -> bool {
         self.flags & (1 << FlagV1::DebugLowerHex as u32) != 0
     }
 
-    const fn debug_upper_hex(&self) -> bool {
+    fn debug_upper_hex(&self) -> bool {
         self.flags & (1 << FlagV1::DebugUpperHex as u32) != 0
     }
 
diff --git a/src/libcore/iter/mod.rs b/src/libcore/iter/mod.rs
index 72a032b57d0..c42fb7019c7 100644
--- a/src/libcore/iter/mod.rs
+++ b/src/libcore/iter/mod.rs
@@ -2658,7 +2658,7 @@ impl<I, U> FusedIterator for Flatten<I>
           I::Item: IntoIterator<IntoIter = U, Item = U::Item> {}
 
 /// Adapts an iterator by flattening it, for use in `flatten()` and `flat_map()`.
-const fn flatten_compat<I, U>(iter: I) -> FlattenCompat<I, U> {
+fn flatten_compat<I, U>(iter: I) -> FlattenCompat<I, U> {
     FlattenCompat { iter, frontiter: None, backiter: None }
 }
 
diff --git a/src/libcore/num/dec2flt/mod.rs b/src/libcore/num/dec2flt/mod.rs
index 0e1f6664d96..f93564c2849 100644
--- a/src/libcore/num/dec2flt/mod.rs
+++ b/src/libcore/num/dec2flt/mod.rs
@@ -187,11 +187,11 @@ impl fmt::Display for ParseFloatError {
     }
 }
 
-const fn pfe_empty() -> ParseFloatError {
+fn pfe_empty() -> ParseFloatError {
     ParseFloatError { kind: FloatErrorKind::Empty }
 }
 
-const fn pfe_invalid() -> ParseFloatError {
+fn pfe_invalid() -> ParseFloatError {
     ParseFloatError { kind: FloatErrorKind::Invalid }
 }
 
diff --git a/src/libcore/num/dec2flt/parse.rs b/src/libcore/num/dec2flt/parse.rs
index 8d8f357425e..e7ed94d4d91 100644
--- a/src/libcore/num/dec2flt/parse.rs
+++ b/src/libcore/num/dec2flt/parse.rs
@@ -39,7 +39,7 @@ pub struct Decimal<'a> {
 }
 
 impl<'a> Decimal<'a> {
-    pub const fn new(integral: &'a [u8], fractional: &'a [u8], exp: i64) -> Decimal<'a> {
+    pub fn new(integral: &'a [u8], fractional: &'a [u8], exp: i64) -> Decimal<'a> {
         Decimal { integral, fractional, exp }
     }
 }
diff --git a/src/libcore/num/dec2flt/rawfp.rs b/src/libcore/num/dec2flt/rawfp.rs
index c5d4aa68958..38f4e4687a9 100644
--- a/src/libcore/num/dec2flt/rawfp.rs
+++ b/src/libcore/num/dec2flt/rawfp.rs
@@ -44,7 +44,7 @@ pub struct Unpacked {
 }
 
 impl Unpacked {
-    pub const fn new(sig: u64, k: i16) -> Self {
+    pub fn new(sig: u64, k: i16) -> Self {
         Unpacked { sig, k }
     }
 }
diff --git a/src/libcore/num/flt2dec/estimator.rs b/src/libcore/num/flt2dec/estimator.rs
index 2a87bf43664..4e33fcfd76e 100644
--- a/src/libcore/num/flt2dec/estimator.rs
+++ b/src/libcore/num/flt2dec/estimator.rs
@@ -15,7 +15,7 @@
 /// This is used to approximate `k = ceil(log_10 (mant * 2^exp))`;
 /// the true `k` is either `k_0` or `k_0+1`.
 #[doc(hidden)]
-pub const fn estimate_scaling_factor(mant: u64, exp: i16) -> i16 {
+pub fn estimate_scaling_factor(mant: u64, exp: i16) -> i16 {
     // 2^(nbits-1) < mant <= 2^nbits if mant > 0
     let nbits = 64 - (mant - 1).leading_zeros() as i64;
     // 1292913986 = floor(2^32 * log_10 2)
diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs
index c06e580e30e..b795cd72150 100644
--- a/src/libcore/ptr.rs
+++ b/src/libcore/ptr.rs
@@ -2759,7 +2759,7 @@ impl<T: ?Sized> Unique<T> {
     }
 
     /// Acquires the underlying `*mut` pointer.
-    pub const fn as_ptr(self) -> *mut T {
+    pub fn as_ptr(self) -> *mut T {
         self.pointer.0 as *mut T
     }
 
diff --git a/src/libcore/slice/memchr.rs b/src/libcore/slice/memchr.rs
index deaeb53e84a..cf95333af9c 100644
--- a/src/libcore/slice/memchr.rs
+++ b/src/libcore/slice/memchr.rs
@@ -29,19 +29,19 @@ const HI_USIZE: usize = HI_U64 as usize;
 /// bytes where the borrow propagated all the way to the most significant
 /// bit."
 #[inline]
-const fn contains_zero_byte(x: usize) -> bool {
+fn contains_zero_byte(x: usize) -> bool {
     x.wrapping_sub(LO_USIZE) & !x & HI_USIZE != 0
 }
 
 #[cfg(target_pointer_width = "16")]
 #[inline]
-const fn repeat_byte(b: u8) -> usize {
+fn repeat_byte(b: u8) -> usize {
     (b as usize) << 8 | b as usize
 }
 
 #[cfg(not(target_pointer_width = "16"))]
 #[inline]
-const fn repeat_byte(b: u8) -> usize {
+fn repeat_byte(b: u8) -> usize {
     (b as usize) * (::usize::MAX / 255)
 }
 
diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs
index dae425da789..fece328f51f 100644
--- a/src/libcore/slice/mod.rs
+++ b/src/libcore/slice/mod.rs
@@ -2737,7 +2737,7 @@ impl<'a, T> IntoIterator for &'a mut [T] {
 
 // Macro helper functions
 #[inline(always)]
-const fn size_from_ptr<T>(_: *const T) -> usize {
+fn size_from_ptr<T>(_: *const T) -> usize {
     mem::size_of::<T>()
 }
 
diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs
index f5bfe804899..e710cbffe4d 100644
--- a/src/libcore/str/mod.rs
+++ b/src/libcore/str/mod.rs
@@ -476,16 +476,16 @@ pub struct Chars<'a> {
 /// The first byte is special, only want bottom 5 bits for width 2, 4 bits
 /// for width 3, and 3 bits for width 4.
 #[inline]
-const fn utf8_first_byte(byte: u8, width: u32) -> u32 { (byte & (0x7F >> width)) as u32 }
+fn utf8_first_byte(byte: u8, width: u32) -> u32 { (byte & (0x7F >> width)) as u32 }
 
 /// Returns the value of `ch` updated with continuation byte `byte`.
 #[inline]
-const fn utf8_acc_cont_byte(ch: u32, byte: u8) -> u32 { (ch << 6) | (byte & CONT_MASK) as u32 }
+fn utf8_acc_cont_byte(ch: u32, byte: u8) -> u32 { (ch << 6) | (byte & CONT_MASK) as u32 }
 
 /// Checks whether the byte is a UTF-8 continuation byte (i.e. starts with the
 /// bits `10`).
 #[inline]
-const fn utf8_is_cont_byte(byte: u8) -> bool { (byte & !CONT_MASK) == TAG_CONT_U8 }
+fn utf8_is_cont_byte(byte: u8) -> bool { (byte & !CONT_MASK) == TAG_CONT_U8 }
 
 #[inline]
 fn unwrap_or_0(opt: Option<&u8>) -> u8 {
@@ -1420,7 +1420,7 @@ const NONASCII_MASK: usize = 0x80808080_80808080u64 as usize;
 
 /// Returns `true` if any byte in the word `x` is nonascii (>= 128).
 #[inline]
-const fn contains_nonascii(x: usize) -> bool {
+fn contains_nonascii(x: usize) -> bool {
     (x & NONASCII_MASK) != 0
 }
 
diff --git a/src/libcore/unicode/bool_trie.rs b/src/libcore/unicode/bool_trie.rs
index 995795839b7..0e6437fded5 100644
--- a/src/libcore/unicode/bool_trie.rs
+++ b/src/libcore/unicode/bool_trie.rs
@@ -71,6 +71,6 @@ impl SmallBoolTrie {
     }
 }
 
-const fn trie_range_leaf(c: u32, bitmap_chunk: u64) -> bool {
+fn trie_range_leaf(c: u32, bitmap_chunk: u64) -> bool {
     ((bitmap_chunk >> (c & 63)) & 1) != 0
 }
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
     }