Rollup merge of #87993 - kornelski:try_reserve_stable, r=joshtriplett

Stabilize try_reserve

Stabilization PR for the [`try_reserve` feature](https://github.com/rust-lang/rust/issues/48043#issuecomment-898040475).
This commit is contained in:
Jubilee 2021-10-04 21:12:33 -07:00 committed by GitHub
commit 99e6e3ff07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 14 additions and 42 deletions

View file

@ -1,5 +1,4 @@
// check-pass
#![feature(try_reserve)]
fn main() {
let mut schema_all: (Vec<String>, Vec<String>) = (vec![], vec![]);

View file

@ -1,4 +0,0 @@
fn main() {
let v = Vec::new();
v.try_reserve(10); //~ ERROR: use of unstable library feature 'try_reserve'
}

View file

@ -1,12 +0,0 @@
error[E0658]: use of unstable library feature 'try_reserve': new API
--> $DIR/feature-gate-try_reserve.rs:3:7
|
LL | v.try_reserve(10);
| ^^^^^^^^^^^
|
= note: see issue #48043 <https://github.com/rust-lang/rust/issues/48043> for more information
= help: add `#![feature(try_reserve)]` to the crate attributes to enable
error: aborting due to previous error
For more information about this error, try `rustc --explain E0658`.