fallout: run-pass tests that use box. (many could be ported to Box::new
instead in the future.)
This commit is contained in:
parent
bfd6f958c4
commit
a7a2dd96ec
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
use std::cell::RefCell;
|
||||
|
||||
|
@ -11,6 +11,8 @@
|
||||
#![crate_name="a"]
|
||||
#![crate_type = "lib"]
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
pub trait i<T> { }
|
||||
|
||||
|
@ -10,6 +10,9 @@
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
static mut COUNT: u64 = 1;
|
||||
|
||||
pub fn get_count() -> u64 { unsafe { COUNT } }
|
||||
|
@ -10,6 +10,9 @@
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
static mut COUNT: u64 = 1;
|
||||
|
||||
pub fn get_count() -> u64 { unsafe { COUNT } }
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
struct pair<A,B> {
|
||||
a: A, b: B
|
||||
}
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
#[derive(PartialEq, Show)]
|
||||
struct Point { x : int }
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
fn pairwise_sub(mut t: Box<DoubleEndedIterator<Item=int>>) -> int {
|
||||
let mut result = 0;
|
||||
loop {
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
trait double {
|
||||
fn double(self: Box<Self>) -> uint;
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
trait double {
|
||||
fn double(self) -> uint;
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
trait double {
|
||||
fn double(self: Box<Self>) -> uint;
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
trait double {
|
||||
fn double(self: Box<Self>) -> uint;
|
||||
}
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
trait double {
|
||||
fn double(self: Box<Self>) -> uint;
|
||||
}
|
||||
|
@ -9,6 +9,9 @@
|
||||
// except according to those terms.
|
||||
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
trait Foo {
|
||||
fn foo(&self) -> String;
|
||||
}
|
||||
|
@ -9,6 +9,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
extern crate collections;
|
||||
use std::collections::Bitv;
|
||||
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
fn borrow<F>(x: &int, f: F) where F: FnOnce(&int) {
|
||||
f(x)
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
struct A { a: int, b: Box<int> }
|
||||
struct B { a: Box<int>, b: Box<int> }
|
||||
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
#![feature(unboxed_closures)]
|
||||
|
||||
pub fn main() {
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
use std::mem::swap;
|
||||
|
||||
#[derive(Show)]
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
struct A { a: int, b: Box<int> }
|
||||
|
||||
fn field_copy_after_field_borrow() {
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
fn foo(x: &mut Box<u8>) {
|
||||
*x = box 5;
|
||||
|
@ -11,6 +11,9 @@
|
||||
// ignore-android (FIXME #11419)
|
||||
// exec-env:RUST_LOG=info
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
|
@ -10,6 +10,8 @@
|
||||
|
||||
// aux-build:cci_borrow_lib.rs
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
extern crate cci_borrow_lib;
|
||||
use cci_borrow_lib::foo;
|
||||
|
@ -9,6 +9,10 @@
|
||||
// except according to those terms.
|
||||
|
||||
// aux-build:cci_class_cast.rs
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
extern crate cci_class_cast;
|
||||
|
||||
use std::string::ToString;
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
use std::fmt;
|
||||
|
||||
struct cat {
|
||||
|
@ -21,6 +21,9 @@
|
||||
// Test that cleanup scope for temporaries created in a match
|
||||
// arm is confined to the match arm itself.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
use std::os;
|
||||
|
||||
struct Test { x: int }
|
||||
|
@ -12,6 +12,8 @@
|
||||
// This test verifies that temporaries created for `while`'s and `if`
|
||||
// conditions are dropped after the condition is evaluated.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
struct Temporary;
|
||||
|
||||
|
@ -24,6 +24,9 @@
|
||||
// It's unclear how likely such a bug is to recur, but it seems like a
|
||||
// scenario worth testing.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
use std::thread::Thread;
|
||||
|
||||
enum Conzabble {
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
use std::thread::Thread;
|
||||
|
||||
struct Pair {
|
||||
|
@ -12,6 +12,9 @@
|
||||
// storing closure data (as we used to do), the u64 would
|
||||
// overwrite the u16.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
struct Pair<A,B> {
|
||||
a: A, b: B
|
||||
}
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
use std::fmt::Show;
|
||||
|
||||
// Check that coercions apply at the pointer level and don't cause
|
||||
|
@ -10,6 +10,7 @@
|
||||
|
||||
// Check that coercions are propagated through match and if expressions.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
pub fn main() {
|
||||
|
@ -11,6 +11,8 @@
|
||||
// Make sure const bounds work on things, and test that a few types
|
||||
// are const.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
fn foo<T: Sync>(x: T) -> T { x }
|
||||
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
// This is a regression test that the metadata for the
|
||||
// name_pool::methods impl in the other crate is reachable from this
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
use std::cell::Cell;
|
||||
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
pub fn main() {
|
||||
let x: Box<int> = box 10;
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
use std::default::Default;
|
||||
|
||||
#[derive(Default)]
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
#![feature(old_orphan_check)]
|
||||
|
||||
extern crate serialize;
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
#[derive(PartialEq, PartialOrd, Eq, Ord)]
|
||||
struct Foo(Box<[u8]>);
|
||||
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
enum t { foo(Box<int>), }
|
||||
|
||||
|
@ -11,6 +11,9 @@
|
||||
// Test that destructor on a struct runs successfully after the struct
|
||||
// is boxed and converted to an object.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
static mut value: uint = 0;
|
||||
|
||||
struct Cat {
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
use std::thread::Thread;
|
||||
use std::sync::mpsc::{channel, Sender};
|
||||
|
||||
|
@ -10,6 +10,9 @@
|
||||
|
||||
// Test that a custom deref with a fat pointer return type does not ICE
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
use std::ops::{Deref, DerefMut};
|
||||
|
||||
pub struct Arr {
|
||||
|
@ -10,6 +10,9 @@
|
||||
|
||||
// Test that a custom deref with a fat pointer return type does not ICE
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
use std::ops::Deref;
|
||||
|
||||
pub struct Arr {
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
struct Fat<T: ?Sized> {
|
||||
f1: int,
|
||||
f2: &'static str,
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
struct Fat<T: ?Sized> {
|
||||
f1: int,
|
||||
f2: &'static str,
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
pub fn main() {
|
||||
assert!(Some(box() ()).is_some());
|
||||
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
pub fn main() {
|
||||
let x = *box() ();
|
||||
}
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
/*!
|
||||
* This is a regression test for a bug in LLVM, fixed in upstream r179587,
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
struct LM { resize_at: uint, size: uint }
|
||||
|
||||
impl Copy for LM {}
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
trait Foo {
|
||||
fn f(self: Box<Self>);
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
static tau: f64 = 2.0*3.14159265358979323;
|
||||
|
||||
struct Point {x: f64, y: f64}
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
fn test_generic<T, F>(expected: Box<T>, eq: F) where T: Clone, F: FnOnce(Box<T>, Box<T>) -> bool {
|
||||
let actual: Box<T> = { expected.clone() };
|
||||
assert!(eq(expected, actual));
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
fn test_generic<T, F>(expected: T, eq: F) where T: Clone, F: FnOnce(T, T) -> bool {
|
||||
let actual: T = { expected.clone() };
|
||||
assert!(eq(expected, actual));
|
||||
|
@ -9,6 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
pub fn main() { let x = { box 100i }; assert!((*x == 100)); }
|
||||
|
@ -9,7 +9,8 @@
|
||||
// except according to those terms.
|
||||
|
||||
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
|
||||
// Tests for if as expressions returning boxed types
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
fn test_generic<T: Clone, F>(expected: Box<T>, eq: F) where F: FnOnce(Box<T>, Box<T>) -> bool {
|
||||
let actual: Box<T> = match true {
|
||||
true => { expected.clone() },
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
fn test_generic<T: Clone, F>(expected: T, eq: F) where F: FnOnce(T, T) -> bool {
|
||||
let actual: T = match true {
|
||||
true => expected.clone(),
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
// Tests for match as expressions resulting in boxed types
|
||||
fn test_box() {
|
||||
|
@ -11,6 +11,9 @@
|
||||
// Issue 4691: Ensure that functional-struct-updates operates
|
||||
// correctly and moves rather than copy when appropriate.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
use std::marker::NoCopy as NP;
|
||||
|
||||
struct ncint { np: NP, v: int }
|
||||
|
@ -11,6 +11,8 @@
|
||||
// Test that we do not leak when the arg pattern must drop part of the
|
||||
// argument (in this case, the `y` field).
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
struct Foo {
|
||||
x: Box<uint>,
|
||||
|
@ -14,6 +14,7 @@
|
||||
// boxes. Make sure that we don't free the box as we match the
|
||||
// pattern.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
fn getaddr(box ref x: Box<uint>) -> *const uint {
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
fn id<T:Send>(t: T) -> T { return t; }
|
||||
|
||||
pub fn main() {
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
struct Recbox<T> {x: Box<T>}
|
||||
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
fn f<T>(x: Box<T>) -> Box<T> { return x; }
|
||||
|
||||
pub fn main() { let x = f(box 3i); println!("{}", *x); }
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
trait Foo<T> {
|
||||
fn get(&self) -> T;
|
||||
|
@ -10,6 +10,8 @@
|
||||
|
||||
// ignore-pretty FIXME(#14193)
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
enum list<T> { cons(Box<T>, Box<list<T>>), nil, }
|
||||
|
||||
|
@ -10,6 +10,8 @@
|
||||
|
||||
#![allow(dead_assignment)]
|
||||
#![allow(unused_variable)]
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
enum option<T> { some(Box<T>), none, }
|
||||
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
struct Triple<T> { x: T, y: T, z: T }
|
||||
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
#![feature(unboxed_closures)]
|
||||
|
||||
/**
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
#![feature(unboxed_closures)]
|
||||
|
||||
// Test that `Fn(int) -> int + 'static` parses as `(Fn(int) -> int) +
|
||||
|
@ -13,6 +13,8 @@
|
||||
|
||||
#![deny(warnings)]
|
||||
#![allow(unused_must_use)]
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
use std::fmt;
|
||||
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
#![feature(unsafe_destructor)]
|
||||
|
||||
use std::cell::Cell;
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
#![feature(intrinsics)]
|
||||
|
||||
mod rusti {
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
#![feature(intrinsics)]
|
||||
|
||||
use std::mem::transmute;
|
||||
|
@ -11,6 +11,9 @@
|
||||
// Regression test for issue #10682
|
||||
// Nested `proc` usage can't use outer owned data
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
fn work(_: Box<int>) {}
|
||||
fn foo<F:FnOnce()>(_: F) {}
|
||||
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
pub fn main() {
|
||||
fn f() {
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
struct DroppableStruct;
|
||||
enum DroppableEnum {
|
||||
DroppableVariant1, DroppableVariant2
|
||||
|
@ -9,6 +9,8 @@
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(dead_code)]
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
trait Foo {}
|
||||
impl Foo for int {}
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
#[derive(Clone)]
|
||||
|
@ -9,6 +9,8 @@
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(dead_code)]
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
// this code used to cause an ICE
|
||||
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
fn main() {
|
||||
fn test() -> Box<std::any::Any + 'static> { box 1i }
|
||||
println!("{:?}", test())
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
struct StrWrap {
|
||||
s: String
|
||||
}
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
struct Foo<'a> {
|
||||
listener: Box<FnMut() + 'a>,
|
||||
}
|
||||
|
@ -13,6 +13,9 @@
|
||||
// value was coerced to a trait object. (v.clone() returns Box<B1>
|
||||
// which is coerced to Box<A>).
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
#[derive(Clone)]
|
||||
struct B1;
|
||||
|
||||
|
@ -11,6 +11,9 @@
|
||||
// All 3 expressions should work in that the argument gets
|
||||
// coerced to a trait object
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
fn main() {
|
||||
send::<Box<Foo>>(box Output(0));
|
||||
Test::<Box<Foo>>::foo(box Output(0));
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
trait Matcher {
|
||||
fn next_match(&mut self) -> Option<(uint, uint)>;
|
||||
}
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
fn match_on_local() {
|
||||
let mut foo = Some(box 5i);
|
||||
match foo {
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
#[derive(PartialEq, Show)]
|
||||
struct Bar {
|
||||
|
@ -10,6 +10,8 @@
|
||||
|
||||
// ignore-pretty
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
#![feature(unboxed_closures)]
|
||||
|
||||
struct Parser<'a, I, O> {
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
#![feature(unboxed_closures)]
|
||||
|
||||
// Test that unboxing shim for calling rust-call ABI methods through a
|
||||
|
@ -8,8 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![feature(unboxed_closures)]
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
#![feature(unboxed_closures)]
|
||||
|
||||
use std::ops::{Deref, DerefMut};
|
||||
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
use std::io;
|
||||
|
||||
fn f(wr: &mut Writer) {
|
||||
|
@ -10,6 +10,9 @@
|
||||
|
||||
// Test that generating drop glue for Box<str> doesn't ICE
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
fn f(s: Box<str>) -> Box<str> {
|
||||
s
|
||||
}
|
||||
|
@ -11,6 +11,9 @@
|
||||
// Check that trans doesn't ICE when translating an array repeat
|
||||
// expression with a count of 1 and a non-Copy element type.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
fn main() {
|
||||
let _ = [box 1u; 1];
|
||||
}
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
trait clam<A> {
|
||||
fn chowder(&self, y: A);
|
||||
|
@ -8,6 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
|
||||
fn a_val(x: Box<int>, y: Box<int>) -> int {
|
||||
*x + *y
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
struct Font {
|
||||
fontbuf: uint,
|
||||
|
@ -11,6 +11,8 @@
|
||||
//
|
||||
// ignore-lexer-test FIXME #15883
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
#![feature(unsafe_destructor)]
|
||||
|
||||
pub type Task = int;
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
trait hax { }
|
||||
impl<A> hax for A { }
|
||||
|
@ -8,6 +8,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
trait hax { }
|
||||
impl<A> hax for A { }
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user