Rollup merge of - 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.
This commit is contained in:
Mazdak Farrokhzad 2020-03-10 06:47:59 +01:00 committed by GitHub
commit 3e9efbd8b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -317,7 +317,7 @@ impl<T> Vec<T> {
/// let mut vec: Vec<i32> = Vec::new();
/// ```
#[inline]
#[rustc_const_stable(feature = "const_vec_new", since = "1.32.0")]
#[rustc_const_stable(feature = "const_vec_new", since = "1.39.0")]
#[stable(feature = "rust1", since = "1.0.0")]
pub const fn new() -> Vec<T> {
Vec { buf: RawVec::NEW, len: 0 }