about summary refs log tree commit diff
path: root/src/libsyntax/util
diff options
context:
space:
mode:
authorJeffrey Seyfried <jeffrey.seyfried@gmail.com>2016-09-02 01:44:23 +0000
committerJeffrey Seyfried <jeffrey.seyfried@gmail.com>2016-09-07 22:12:30 +0000
commit3af0c6572eebd2c7fad72e8ba37eac71b8abc8bc (patch)
tree81241a978f6e5fd31d4f134e96852cc63b049793 /src/libsyntax/util
parent2c88b4b7908b8451e9c3a3c8d9c8ea43fa78c52a (diff)
downloadrust-3af0c6572eebd2c7fad72e8ba37eac71b8abc8bc.tar.gz
rust-3af0c6572eebd2c7fad72e8ba37eac71b8abc8bc.zip
Refactor code out of the folder implementation for `StripUnconfigured`.
Diffstat (limited to 'src/libsyntax/util')
-rw-r--r--src/libsyntax/util/small_vector.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libsyntax/util/small_vector.rs b/src/libsyntax/util/small_vector.rs
index 893646f121f..373dfc4ddfa 100644
--- a/src/libsyntax/util/small_vector.rs
+++ b/src/libsyntax/util/small_vector.rs
@@ -29,6 +29,12 @@ enum SmallVectorRepr<T> {
     Many(Vec<T>),
 }
 
+impl<T> Default for SmallVector<T> {
+    fn default() -> Self {
+        SmallVector { repr: Zero }
+    }
+}
+
 impl<T> Into<Vec<T>> for SmallVector<T> {
     fn into(self) -> Vec<T> {
         match self.repr {