about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libstd/macros.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs
index ba72e1f2549..f0ea90a4aed 100644
--- a/src/libstd/macros.rs
+++ b/src/libstd/macros.rs
@@ -366,12 +366,14 @@ macro_rules! try(
     ($e:expr) => (match $e { Ok(e) => e, Err(e) => return Err(e) })
 )
 
+/// Create a `std::vec_ng::Vec` containing the arguments.
 #[macro_export]
 macro_rules! vec(
     ($($e:expr),*) => ({
-        let mut temp = ::std::vec_ng::Vec::new();
-        $(temp.push($e);)*
-        temp
+        // leading _ to allow empty construction without a warning.
+        let mut _temp = ::std::vec_ng::Vec::new();
+        $(_temp.push($e);)*
+        _temp
     })
 )