Make Vec::new const

This commit is contained in:
Mark Mansi 2018-04-25 16:33:02 -05:00
parent 25749ad66d
commit 256096da9e
4 changed files with 34 additions and 4 deletions

View file

@ -0,0 +1,15 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// Test that Vec::new() can be used for constants
const MY_VEC: Vec<usize> = Vec::new();
pub fn main() {}