diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2018-10-23 23:09:44 +0200 |
|---|---|---|
| committer | Mazdak Farrokhzad <twingoow@gmail.com> | 2018-11-10 01:10:07 +0100 |
| commit | e15c62d61fa02fac93992db9297aa4a8a56cef93 (patch) | |
| tree | 7f1e21f22c66f3d4988fdbf347031bd6d67a3af0 /src/liballoc | |
| parent | d1d2aa22c0d15465af1daccdb3821450c98d0ed0 (diff) | |
| download | rust-e15c62d61fa02fac93992db9297aa4a8a56cef93.tar.gz rust-e15c62d61fa02fac93992db9297aa4a8a56cef93.zip | |
revert making internal APIs const fn.
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/collections/binary_heap.rs | 2 | ||||
| -rw-r--r-- | src/liballoc/collections/btree/node.rs | 2 | ||||
| -rw-r--r-- | src/liballoc/collections/linked_list.rs | 2 | ||||
| -rw-r--r-- | src/liballoc/collections/vec_deque.rs | 2 | ||||
| -rw-r--r-- | src/liballoc/raw_vec.rs | 4 |
5 files changed, 6 insertions, 6 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 } |
