parent
15e9a95a4b
commit
34aed8f062
15 changed files with 27 additions and 28 deletions
|
@ -30,6 +30,7 @@
|
||||||
#![cfg_attr(not(stage0), deny(warnings))]
|
#![cfg_attr(not(stage0), deny(warnings))]
|
||||||
|
|
||||||
#![feature(alloc)]
|
#![feature(alloc)]
|
||||||
|
#![feature(allow_internal_unstable)]
|
||||||
#![feature(box_patterns)]
|
#![feature(box_patterns)]
|
||||||
#![feature(box_syntax)]
|
#![feature(box_syntax)]
|
||||||
#![feature(core_intrinsics)]
|
#![feature(core_intrinsics)]
|
||||||
|
|
|
@ -41,12 +41,13 @@
|
||||||
#[cfg(not(test))]
|
#[cfg(not(test))]
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[allow_internal_unstable]
|
||||||
macro_rules! vec {
|
macro_rules! vec {
|
||||||
($elem:expr; $n:expr) => (
|
($elem:expr; $n:expr) => (
|
||||||
$crate::vec::from_elem($elem, $n)
|
$crate::vec::from_elem($elem, $n)
|
||||||
);
|
);
|
||||||
($($x:expr),*) => (
|
($($x:expr),*) => (
|
||||||
<[_]>::into_vec($crate::boxed::Box::new([$($x),*]))
|
<[_]>::into_vec(box [$($x),*])
|
||||||
);
|
);
|
||||||
($($x:expr,)*) => (vec![$($x),*])
|
($($x:expr,)*) => (vec![$($x),*])
|
||||||
}
|
}
|
||||||
|
@ -61,7 +62,7 @@ macro_rules! vec {
|
||||||
$crate::vec::from_elem($elem, $n)
|
$crate::vec::from_elem($elem, $n)
|
||||||
);
|
);
|
||||||
($($x:expr),*) => (
|
($($x:expr),*) => (
|
||||||
$crate::slice::into_vec($crate::boxed::Box::new([$($x),*]))
|
$crate::slice::into_vec(box [$($x),*])
|
||||||
);
|
);
|
||||||
($($x:expr,)*) => (vec![$($x),*])
|
($($x:expr,)*) => (vec![$($x),*])
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,9 +8,6 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
|
||||||
// pretty-expanded FIXME #23616
|
|
||||||
|
|
||||||
trait Foo {
|
trait Foo {
|
||||||
fn foo(self);
|
fn foo(self);
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,9 +8,6 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
|
||||||
// pretty-expanded FIXME #23616
|
|
||||||
|
|
||||||
struct F { f: Vec<isize> }
|
struct F { f: Vec<isize> }
|
||||||
|
|
||||||
fn impure(_v: &[isize]) {
|
fn impure(_v: &[isize]) {
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
// pretty-expanded FIXME #23616
|
|
||||||
|
|
||||||
enum wrapper<T> { wrapped(T), }
|
enum wrapper<T> { wrapped(T), }
|
||||||
|
|
||||||
pub fn main() { let _w = wrapper::wrapped(vec!(1, 2, 3, 4, 5)); }
|
pub fn main() { let _w = wrapper::wrapped(vec!(1, 2, 3, 4, 5)); }
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
// pretty-expanded FIXME #23616
|
|
||||||
|
|
||||||
#![feature(unboxed_closures)]
|
#![feature(unboxed_closures)]
|
||||||
|
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
// impl.
|
// impl.
|
||||||
|
|
||||||
// aux-build:issue-18514.rs
|
// aux-build:issue-18514.rs
|
||||||
// pretty-expanded FIXME #23616
|
|
||||||
|
|
||||||
extern crate issue_18514 as ice;
|
extern crate issue_18514 as ice;
|
||||||
use ice::{Tr, St};
|
use ice::{Tr, St};
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
|
|
||||||
// aux-build:issue-2631-a.rs
|
// aux-build:issue-2631-a.rs
|
||||||
|
|
||||||
// pretty-expanded FIXME #23616
|
|
||||||
|
|
||||||
extern crate req;
|
extern crate req;
|
||||||
|
|
||||||
use req::request;
|
use req::request;
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
|
|
||||||
// aux-build:issue_2723_a.rs
|
// aux-build:issue_2723_a.rs
|
||||||
|
|
||||||
// pretty-expanded FIXME #23616
|
|
||||||
|
|
||||||
extern crate issue_2723_a;
|
extern crate issue_2723_a;
|
||||||
use issue_2723_a::f;
|
use issue_2723_a::f;
|
||||||
|
|
||||||
|
|
23
src/test/run-pass/issue-28950.rs
Normal file
23
src/test/run-pass/issue-28950.rs
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
// Copyright 2012-2016 The Rust Project Developers. See the COPYRIGHT
|
||||||
|
// file at the top-level directory of this distribution and at
|
||||||
|
// http://rust-lang.org/COPYRIGHT.
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
// option. This file may not be copied, modified, or distributed
|
||||||
|
// except according to those terms.
|
||||||
|
|
||||||
|
// Tests that the `vec!` macro does not overflow the stack when it is
|
||||||
|
// given data larger than the stack.
|
||||||
|
|
||||||
|
const LEN: usize = 1 << 15;
|
||||||
|
|
||||||
|
use std::thread::Builder;
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
assert!(Builder::new().stack_size(LEN / 2).spawn(|| {
|
||||||
|
let vec = vec![[0; LEN]];
|
||||||
|
assert_eq!(vec.len(), 1);
|
||||||
|
}).unwrap().join().is_ok());
|
||||||
|
}
|
|
@ -8,8 +8,5 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
|
||||||
// pretty-expanded FIXME #23616
|
|
||||||
|
|
||||||
fn f(_a: Vec<isize> ) { }
|
fn f(_a: Vec<isize> ) { }
|
||||||
pub fn main() { f(vec!(1, 2, 3, 4, 5)); }
|
pub fn main() { f(vec!(1, 2, 3, 4, 5)); }
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
// pretty-expanded FIXME #23616
|
|
||||||
// ignore-emscripten no threads support
|
// ignore-emscripten no threads support
|
||||||
|
|
||||||
#![feature(std_misc)]
|
#![feature(std_misc)]
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
// pretty-expanded FIXME #23616
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
vec![1_usize, 2, 3].len();
|
vec![1_usize, 2, 3].len();
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,9 +11,6 @@
|
||||||
// Test lifetimes are linked properly when we autoslice a vector.
|
// Test lifetimes are linked properly when we autoslice a vector.
|
||||||
// Issue #3148.
|
// Issue #3148.
|
||||||
|
|
||||||
|
|
||||||
// pretty-expanded FIXME #23616
|
|
||||||
|
|
||||||
fn subslice1<'r>(v: &'r [usize]) -> &'r [usize] { v }
|
fn subslice1<'r>(v: &'r [usize]) -> &'r [usize] { v }
|
||||||
|
|
||||||
fn both<'r>(v: &'r [usize]) -> &'r [usize] {
|
fn both<'r>(v: &'r [usize]) -> &'r [usize] {
|
||||||
|
|
|
@ -8,6 +8,4 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
// pretty-expanded FIXME #23616
|
|
||||||
|
|
||||||
pub fn main() { let mut v = vec!(1, 2, 3); v.push(1); }
|
pub fn main() { let mut v = vec!(1, 2, 3); v.push(1); }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue