Rollup merge of #50233 - mark-i-m:const_vec, r=kennytm

Make `Vec::new` a `const fn`

`RawVec::empty/_in` are a hack. They're there because `if size_of::<T> == 0 { !0 } else { 0 }` is not allowed in `const` yet. However, because `RawVec` is unstable, the `empty/empty_in` constructors can be removed when #49146 is done...
This commit is contained in:
kennytm
2018-05-01 01:18:36 +08:00
committed by GitHub
5 changed files with 28 additions and 8 deletions

View File

@@ -124,6 +124,7 @@
#![feature(pointer_methods)]
#![feature(inclusive_range_fields)]
#![cfg_attr(stage0, feature(generic_param_attrs))]
#![feature(rustc_const_unstable)]
#![cfg_attr(not(test), feature(fn_traits, i128))]
#![cfg_attr(test, feature(test))]