Skip to content

Commit 3e9efbd

Browse files
authored
Rollup merge of #69877 - CAD97:patch-1, r=dtolnay
Vec::new is const stable in 1.39 not 1.32 Changelog: https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1390-2019-11-07 This really surprised me when a MSRV check for 1.35 failed with `Vec::new is not yet stable as a const fn` and the docs said that it was const stabilized in 1.32.
2 parents 20361bd + a561962 commit 3e9efbd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/liballoc/vec.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ impl<T> Vec<T> {
317317
/// let mut vec: Vec<i32> = Vec::new();
318318
/// ```
319319
#[inline]
320-
#[rustc_const_stable(feature = "const_vec_new", since = "1.32.0")]
320+
#[rustc_const_stable(feature = "const_vec_new", since = "1.39.0")]
321321
#[stable(feature = "rust1", since = "1.0.0")]
322322
pub const fn new() -> Vec<T> {
323323
Vec { buf: RawVec::NEW, len: 0 }

0 commit comments

Comments
 (0)