Skip to content

Commit 3a833d8

Browse files
lifthrasiiralexcrichton
authored andcommitted
---
yaml --- r: 110519 b: refs/heads/snap-stage3 c: 7a28171 h: refs/heads/master i: 110517: 8985b76 110515: 427794a 110511: 1a6a028 v: v3
1 parent febeca6 commit 3a833d8

File tree

4 files changed

+31
-2
lines changed

4 files changed

+31
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: e415c25bcd81dc1f9a5a3d25d9b48ed2d545336b
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 87334fb05ff2a665419241d877c13d6c4770a3f4
4+
refs/heads/snap-stage3: 7a281718f0d32ea678f031252c0e130035fc2a80
55
refs/heads/try: 597a645456b55e1c886ce15d23a192abdf4d55cf
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libstd/macros.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,8 @@ macro_rules! vec(
273273
let mut _temp = ::std::vec::Vec::new();
274274
$(_temp.push($e);)*
275275
_temp
276-
})
276+
});
277+
($($e:expr),+,) => (vec!($($e),+))
277278
)
278279

279280

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
pub fn main() {
12+
vec!(,); //~ ERROR unexpected token
13+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
12+
pub fn main() {
13+
assert_eq!(vec!(1), vec!(1,));
14+
assert_eq!(vec!(1, 2, 3), vec!(1, 2, 3,));
15+
}

0 commit comments

Comments
 (0)