Skip to content

Commit 45664e5

Browse files
committed
---
yaml --- r: 156225 b: refs/heads/snap-stage3 c: 02d976a h: refs/heads/master i: 156223: 6703f27 v: v3
1 parent ef60778 commit 45664e5

File tree

6 files changed

+14
-15
lines changed

6 files changed

+14
-15
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: c29a7520e7fb4a5b4d4eccfc594e05793ef6688d
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 310f2deb99a95bae63173f8f972a1f91f2138ca3
4+
refs/heads/snap-stage3: 02d976a7f9ae838901b50b64109d90d54619fe4d
55
refs/heads/try: 6601b0501e31d08d3892a2d5a7d8a57ab120bf75
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libcollections/slice.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2331,7 +2331,7 @@ mod tests {
23312331
fn test_into_vec() {
23322332
let xs = box [1u, 2, 3];
23332333
let ys = xs.into_vec();
2334-
assert_eq!(ys.as_slice(), [1u, 2, 3]);
2334+
assert_eq!(ys.as_slice(), [1u, 2, 3].as_slice());
23352335
}
23362336
}
23372337

branches/snap-stage3/src/libcollections/vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2650,7 +2650,7 @@ mod tests {
26502650
fn test_into_boxed_slice() {
26512651
let xs = vec![1u, 2, 3];
26522652
let ys = xs.into_boxed_slice();
2653-
assert_eq!(ys.as_slice(), [1u, 2, 3]);
2653+
assert_eq!(ys.as_slice(), [1u, 2, 3].as_slice());
26542654
}
26552655

26562656
#[bench]

branches/snap-stage3/src/libstd/io/net/tcp.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
//! listener (socket server) implements the `Listener` and `Acceptor` traits.
1919
2020
use clone::Clone;
21-
use collections::MutableSeq;
2221
use io::IoResult;
2322
use iter::Iterator;
2423
use slice::ImmutableSlice;

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,9 @@ mod std {
272272
// The test runner calls ::std::os::args() but really wants realstd
273273
#[cfg(test)] pub use realstd::os as os;
274274
// The test runner requires std::slice::Vector, so re-export std::slice just for it.
275-
#[cfg(test)] pub use slice;
275+
//
276+
// It is also used in vec![]
277+
pub use slice;
276278

277-
pub use collections; // vec!() uses MutableSeq
279+
pub use boxed; // used for vec![]
278280
}

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

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -323,16 +323,14 @@ macro_rules! try(
323323

324324
/// Create a `std::vec::Vec` containing the arguments.
325325
#[macro_export]
326-
macro_rules! vec(
327-
($($e:expr),*) => ({
328-
// leading _ to allow empty construction without a warning.
329-
let mut _temp = ::std::vec::Vec::new();
330-
$(_temp.push($e);)*
331-
_temp
326+
macro_rules! vec[
327+
($($x:expr),*) => ({
328+
use std::slice::BoxedSlice;
329+
let xs: ::std::boxed::Box<[_]> = box [$($x),*];
330+
xs.into_vec()
332331
});
333-
($($e:expr),+,) => (vec!($($e),+))
334-
)
335-
332+
($($x:expr,)*) => (vec![$($x),*])
333+
]
336334

337335
/// A macro to select an event from a number of receivers.
338336
///

0 commit comments

Comments
 (0)