]> git.lizzy.rs Git - rust.git/commitdiff
make Vec::new const :P
authorMark Mansi <markm@cs.wisc.edu>
Thu, 26 Apr 2018 17:46:28 +0000 (12:46 -0500)
committerMark Mansi <markm@cs.wisc.edu>
Thu, 26 Apr 2018 17:46:28 +0000 (12:46 -0500)
src/liballoc/vec.rs

index 757606607bbcfc3f9184b72eb88dc337d48a693a..1d95f76fd7732b49acf9f55cc89795942a805318 100644 (file)
@@ -322,7 +322,7 @@ impl<T> Vec<T> {
     /// ```
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
-    pub fn new() -> Vec<T> {
+    pub const fn new() -> Vec<T> {
         Vec {
             buf: RawVec::empty(),
             len: 0,