diff options
| author | Markus Everling <markuseverling@gmail.com> | 2022-12-01 12:15:29 +0100 |
|---|---|---|
| committer | Markus Everling <markuseverling@gmail.com> | 2022-12-01 12:15:29 +0100 |
| commit | 929003aacf27e23d72264bc8fcb15cf3a68aee83 (patch) | |
| tree | 2cd88fdeef6542c5230c2a9e76ec1961b59e7f00 | |
| parent | e0098a5cc3a87d857e597af824d0ce1ed1ad85e0 (diff) | |
| download | rust-929003aacf27e23d72264bc8fcb15cf3a68aee83.tar.gz rust-929003aacf27e23d72264bc8fcb15cf3a68aee83.zip | |
Make `VecDeque::new_in` unstably const
| -rw-r--r-- | library/alloc/src/collections/vec_deque/mod.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/library/alloc/src/collections/vec_deque/mod.rs b/library/alloc/src/collections/vec_deque/mod.rs index 86d77182bcc..f39223f6a2d 100644 --- a/library/alloc/src/collections/vec_deque/mod.rs +++ b/library/alloc/src/collections/vec_deque/mod.rs @@ -566,10 +566,9 @@ impl<T, A: Allocator> VecDeque<T, A> { /// /// let deque: VecDeque<u32> = VecDeque::new(); /// ``` - // FIXME: This should probably be const #[inline] #[unstable(feature = "allocator_api", issue = "32838")] - pub fn new_in(alloc: A) -> VecDeque<T, A> { + pub const fn new_in(alloc: A) -> VecDeque<T, A> { VecDeque { head: 0, len: 0, buf: RawVec::new_in(alloc) } } |
