Skip to content

Commit 809b14a

Browse files
committed
Auto merge of #31797 - apasel422:issue-28950, r=alexcrichton
Closes #28950. r? @eddyb
2 parents 493d999 + 34aed8f commit 809b14a

15 files changed

+27
-28
lines changed

src/libcollections/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#![cfg_attr(not(stage0), deny(warnings))]
3232

3333
#![feature(alloc)]
34+
#![feature(allow_internal_unstable)]
3435
#![feature(box_patterns)]
3536
#![feature(box_syntax)]
3637
#![feature(core_intrinsics)]

src/libcollections/macros.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,13 @@
4141
#[cfg(not(test))]
4242
#[macro_export]
4343
#[stable(feature = "rust1", since = "1.0.0")]
44+
#[allow_internal_unstable]
4445
macro_rules! vec {
4546
($elem:expr; $n:expr) => (
4647
$crate::vec::from_elem($elem, $n)
4748
);
4849
($($x:expr),*) => (
49-
<[_]>::into_vec($crate::boxed::Box::new([$($x),*]))
50+
<[_]>::into_vec(box [$($x),*])
5051
);
5152
($($x:expr,)*) => (vec![$($x),*])
5253
}
@@ -61,7 +62,7 @@ macro_rules! vec {
6162
$crate::vec::from_elem($elem, $n)
6263
);
6364
($($x:expr),*) => (
64-
$crate::slice::into_vec($crate::boxed::Box::new([$($x),*]))
65+
$crate::slice::into_vec(box [$($x),*])
6566
);
6667
($($x:expr,)*) => (vec![$($x),*])
6768
}

src/test/run-pass/borrow-by-val-method-receiver.rs

-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
12-
// pretty-expanded FIXME #23616
13-
1411
trait Foo {
1512
fn foo(self);
1613
}

src/test/run-pass/borrowck/borrowck-binding-mutbl.rs

-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
12-
// pretty-expanded FIXME #23616
13-
1411
struct F { f: Vec<isize> }
1512

1613
fn impure(_v: &[isize]) {

src/test/run-pass/generic-ivec-leak.rs

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// pretty-expanded FIXME #23616
12-
1311
enum wrapper<T> { wrapped(T), }
1412

1513
pub fn main() { let _w = wrapper::wrapped(vec!(1, 2, 3, 4, 5)); }

src/test/run-pass/issue-17816.rs

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// pretty-expanded FIXME #23616
12-
1311
#![feature(unboxed_closures)]
1412

1513
use std::marker::PhantomData;

src/test/run-pass/issue-18514.rs

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
// impl.
1616

1717
// aux-build:issue-18514.rs
18-
// pretty-expanded FIXME #23616
1918

2019
extern crate issue_18514 as ice;
2120
use ice::{Tr, St};

src/test/run-pass/issue-2631-b.rs

-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
// aux-build:issue-2631-a.rs
1313

14-
// pretty-expanded FIXME #23616
15-
1614
extern crate req;
1715

1816
use req::request;

src/test/run-pass/issue-2723-b.rs

-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
// aux-build:issue_2723_a.rs
1212

13-
// pretty-expanded FIXME #23616
14-
1513
extern crate issue_2723_a;
1614
use issue_2723_a::f;
1715

src/test/run-pass/issue-28950.rs

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Copyright 2012-2016 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+
// Tests that the `vec!` macro does not overflow the stack when it is
12+
// given data larger than the stack.
13+
14+
const LEN: usize = 1 << 15;
15+
16+
use std::thread::Builder;
17+
18+
fn main() {
19+
assert!(Builder::new().stack_size(LEN / 2).spawn(|| {
20+
let vec = vec![[0; LEN]];
21+
assert_eq!(vec.len(), 1);
22+
}).unwrap().join().is_ok());
23+
}

src/test/run-pass/ivec-pass-by-value.rs

-3
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,5 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
12-
// pretty-expanded FIXME #23616
13-
1411
fn f(_a: Vec<isize> ) { }
1512
pub fn main() { f(vec!(1, 2, 3, 4, 5)); }

src/test/run-pass/ivec-tag.rs

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// pretty-expanded FIXME #23616
1211
// ignore-emscripten no threads support
1312

1413
#![feature(std_misc)]

src/test/run-pass/macro-delimiter-significance.rs

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// pretty-expanded FIXME #23616
12-
1311
fn main() {
1412
vec![1_usize, 2, 3].len();
1513
}

src/test/run-pass/regions-dependent-autoslice.rs

-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111
// Test lifetimes are linked properly when we autoslice a vector.
1212
// Issue #3148.
1313

14-
15-
// pretty-expanded FIXME #23616
16-
1714
fn subslice1<'r>(v: &'r [usize]) -> &'r [usize] { v }
1815

1916
fn both<'r>(v: &'r [usize]) -> &'r [usize] {

src/test/run-pass/vec-push.rs

-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,4 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// pretty-expanded FIXME #23616
12-
1311
pub fn main() { let mut v = vec!(1, 2, 3); v.push(1); }

0 commit comments

Comments
 (0)