// 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;
#![crate_name="a"]
#![crate_type = "lib"]
+#![allow(unknown_features)]
+#![feature(box_syntax)]
pub trait i<T> { }
#![crate_type = "lib"]
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
static mut COUNT: u64 = 1;
pub fn get_count() -> u64 { unsafe { COUNT } }
#![crate_type = "lib"]
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
static mut COUNT: u64 = 1;
pub fn get_count() -> u64 { unsafe { COUNT } }
// 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
}
// 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 }
// 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 {
// 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;
// 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;
// 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;
// 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;
}
// 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;
}
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
trait Foo {
fn foo(&self) -> String;
}
// 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;
// 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)
// 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> }
// 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() {
// 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)]
// 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() {
// 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;
// ignore-android (FIXME #11419)
// exec-env:RUST_LOG=info
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
#[macro_use]
extern crate log;
// aux-build:cci_borrow_lib.rs
+#![allow(unknown_features)]
+#![feature(box_syntax)]
extern crate cci_borrow_lib;
use cci_borrow_lib::foo;
// 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;
// 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 {
// 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 }
// 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;
// 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 {
// 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 {
// 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
}
// 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
// Check that coercions are propagated through match and if expressions.
+#![allow(unknown_features)]
#![feature(box_syntax)]
pub fn main() {
// 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 }
// 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
// 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;
// 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;
// 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)]
// 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;
// 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]>);
// 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>), }
// 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 {
// 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};
// 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 {
// 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 {
// 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,
// 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,
// 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());
// 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() ();
}
// 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,
// 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 {}
// 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>);
// 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}
// 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));
// 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));
// except according to those terms.
-
+#![allow(unknown_features)]
+#![feature(box_syntax)]
pub fn main() { let x = { box 100i }; assert!((*x == 100)); }
// except according to those terms.
-
+#![allow(unknown_features)]
+#![feature(box_syntax)]
// Tests for if as expressions returning boxed types
// 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() },
// 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(),
// 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() {
// 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 }
// 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>,
// 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 {
// 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() {
// 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>}
// 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); }
// 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;
// ignore-pretty FIXME(#14193)
+#![allow(unknown_features)]
+#![feature(box_syntax)]
enum list<T> { cons(Box<T>, Box<list<T>>), nil, }
#![allow(dead_assignment)]
#![allow(unused_variable)]
+#![allow(unknown_features)]
+#![feature(box_syntax)]
enum option<T> { some(Box<T>), none, }
// 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 }
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
#![feature(unboxed_closures)]
/**
// 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) +
#![deny(warnings)]
#![allow(unused_must_use)]
+#![allow(unknown_features)]
+#![feature(box_syntax)]
use std::fmt;
// 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;
// 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 {
// 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;
// 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) {}
// 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() {
// 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
// except according to those terms.
#![allow(dead_code)]
+#![allow(unknown_features)]
+#![feature(box_syntax)]
trait Foo {}
impl Foo for int {}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
#![feature(box_syntax)]
#[derive(Clone)]
// except according to those terms.
#![allow(dead_code)]
+#![allow(unknown_features)]
+#![feature(box_syntax)]
// this code used to cause an ICE
// 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())
// 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
}
// 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>,
}
// 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;
// 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));
// 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)>;
}
// 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 {
// 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 {
// ignore-pretty
+#![allow(unknown_features)]
+#![feature(box_syntax)]
#![feature(unboxed_closures)]
struct Parser<'a, I, O> {
// 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
// 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};
// 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) {
// 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
}
// 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];
}
// 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);
// 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
// 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,
//
// ignore-lexer-test FIXME #15883
+#![allow(unknown_features)]
+#![feature(box_syntax)]
#![feature(unsafe_destructor)]
pub type Task = int;
// 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 { }
// 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 { }
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
//type t = { a: int };
// type t = { a: bool };
// aux-build:issue-3012-1.rs
+#![allow(unknown_features)]
+#![feature(box_syntax)]
extern crate socketlib;
extern crate libc;
// 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::HashMap;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
type Connection = Box<FnMut(Vec<u8>) + 'static>;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
enum side { mayo, catsup, vinegar }
enum order { hamburger, fries(side), shake }
// 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 mut x = box 3i;
x = x;
// rustc --test ignores2.rs && ./ignores2
+#![allow(unknown_features)]
+#![feature(box_syntax)]
#![feature(unboxed_closures)]
use std::path::{Path};
// 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;
// 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::Sender;
use std::thunk::Invoke;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
trait T {
fn print(&self);
}
// except according to those terms.
#![allow(path_statement)]
+#![allow(unknown_features)]
+#![feature(box_syntax)]
pub fn main() {
let y = box 1i;
// ignore-fast doesn't like extern crate
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
extern crate libc;
use std::mem::transmute;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
struct T { a: Box<int> }
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
pub trait EventLoop {
}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
struct Dog {
name : String
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
struct Element;
macro_rules! foo {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
pub struct Foo {
a: int,
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
enum Either<T, U> { Left(T), Right(U) }
// 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::HashMap;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
pub enum Thing {
A(Box<Foo+'static>)
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
#![feature(box_syntax)]
fn foo(box (_x, _y): Box<(int, int)>) {}
*/
+#![allow(unknown_features)]
+#![feature(box_syntax)]
pub fn main() {}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
pub fn main() {
match &[(box 5i,box 7i)] {
ps => {
// ignore-pretty
+#![allow(unknown_features)]
+#![feature(box_syntax)]
pub trait bomb { fn boom(&self, Ident); }
pub struct S;
// except according to those terms.
#![allow(unnecessary_allocation)]
+#![allow(unknown_features)]
+#![feature(box_syntax)]
// Tests for a previous bug that occurred due to an interaction
// between struct field initialization and the auto-coercion
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
trait repeat<A> { fn get(&self) -> A; }
// Make sure #1399 stays fixed
+#![allow(unknown_features)]
+#![feature(box_syntax)]
#![feature(unboxed_closures)]
struct A { a: Box<int> }
// Make sure #1399 stays fixed
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
struct A { a: Box<int> }
pub fn main() {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
fn leaky<T>(_t: T) { }
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
fn f() {
let a = box 1;
let b: &int = &*a;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
enum list { cons(int, Box<list>), nil, }
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
struct Pair { a: Box<int>, b: Box<int> }
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
#![feature(box_syntax)]
pub fn main() {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
fn foo(x: Option<Box<int>>, b: bool) -> int {
match x {
// Test method calls with self as an argument (cross-crate)
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
// aux-build:method_self_arg1.rs
extern crate method_self_arg1;
use method_self_arg1::Foo;
// Test method calls with self as an argument (cross-crate)
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
// aux-build:method_self_arg2.rs
extern crate method_self_arg2;
use method_self_arg2::{Foo, Bar};
// Test method calls with self as an argument
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
static mut COUNT: u64 = 1;
struct Foo;
// Test method calls with self as an argument
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
static mut COUNT: uint = 1;
struct Foo;
// version will run (note that the `push` occurs after the call to
// `foo()`).
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
trait Foo {
fn foo(&self) -> int;
}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
#[derive(Clone)]
struct Triple {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
struct X { x: int, y: int, z: int }
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
struct X { x: int, y: int, z: int }
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
#[derive(Clone)]
struct Triple {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
struct Triple {a: int, b: int, c: int}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
struct Triple { a: int, b: int, c: int }
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
fn test(foo: Box<Vec<int>> ) { assert!(((*foo)[0] == 10)); }
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
fn test(foo: Box<Vec<int>>) { assert!(((*foo)[0] == 10)); }
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
fn f(mut y: Box<int>) {
*y = 5;
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
+#![allow(unknown_features)]
#![feature(box_syntax)]
// Tests that the new `box` syntax works with unique pointers.
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
fn f(x: Box<int>) {
let y: &int = &*x;
// Test that the lambda kind is inferred correctly as a return
// expression
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
fn unique() -> Box<FnMut()+'static> { return box || (); }
pub fn main() {
// Test that the lambda kind is inferred correctly as a return
// expression
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
fn unique() -> Box<FnMut()+'static> { box || () }
pub fn main() {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
use std::{option, mem};
// Iota-reduction is a rule in the Calculus of (Co-)Inductive Constructions,
// Testing creating two vtables with the same self type, but different
// traits.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
use std::any::Any;
trait Wrap {
// closed over do not contain managed values, and thus the boxes do
// not have headers.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
trait FooTrait {
fn foo(&self) -> uint;
// closed over contain managed values. This implies that the boxes
// will have headers that must be skipped over.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
trait FooTrait {
fn foo(self: Box<Self>) -> uint;
#![allow(dead_assignment)]
#![allow(unused_variable)]
+#![allow(unknown_features)]
+#![feature(box_syntax)]
struct A { a: int, b: int }
struct Abox { a: Box<int>, b: Box<int> }
// 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;
use std::rc::Rc;
use std::num::ToPrimitive;
// 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;
use std::rc::Rc;
use std::string::String;
// Test overloaded indexing combined with autoderef.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
use std::ops::{Index, IndexMut};
struct Foo {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
fn f<T: 'static>(_x: T) {}
pub fn main() {
// Check that functions can modify local state.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
fn sums_to(v: Vec<int> , sum: int) -> bool {
let mut i = 0u;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
trait get {
fn get(self) -> int;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
fn foo(x: &uint) -> uint {
*x
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
fn foo(x: &uint) -> uint {
*x
}
// A test where we (successfully) close over a reference into
// an object.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
trait SomeTrait { fn get(&self) -> int; }
impl<'a> SomeTrait for &'a int {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
#![feature(unboxed_closures)]
struct closure_box<'a> {
// Test lifetimes are linked properly when we create dependent region pointers.
// Issue #3148.
+#![allow(unknown_features)]
#![feature(box_syntax)]
struct A {
// Tests that you can use an early-bound lifetime parameter as
// on of the generic parameters in a trait.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
trait Trait<'a> {
fn long(&'a self) -> int;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
fn foo(x: &uint) -> &uint { x }
fn bar(x: &uint) -> uint { *x }
#![allow(dead_assignment)]
#![allow(unused_variable)]
+#![allow(unknown_features)]
+#![feature(box_syntax)]
// Should pass region checking.
fn ok(f: Box<FnMut(&uint)>) {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
fn borrow<T>(x: &T) -> &T {x}
pub fn main() {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
struct Point {x: int, y: int}
// doing region-folding, when really all clients of the region-folding
// case only want to see FREE lifetime variables, not bound ones.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
pub fn main() {
fn explicit() {
fn test<F>(_x: Option<Box<F>>) where F: FnMut(Box<for<'a> FnMut(&'a int)>) {}
// changes were caught. However, those uses in the compiler could
// easily get changed or refactored away in the future.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
struct Ctxt<'tcx> {
x: &'tcx Vec<int>
}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
#![feature(unboxed_closures)]
struct closure_box<'a> {
// exec-env:RUST_LOG=rust-log-filter/f.o
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
#[macro_use]
extern crate log;
// Test that we can use `Self` types in impls in the expected way.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
struct Foo;
// Test uses on inherent impl.
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
struct X {
a: int
// Ensure assigning an owned or managed variable to itself works. In particular,
// that we do not glue_drop before we glue_take (#3290).
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
use std::rc::Rc;
pub fn main() {
// 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;
pub fn main() { test05(); }
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
#[derive(Show)]
struct Foo(Box<[u8]>);
// 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;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
use std::sync::mpsc::channel;
use std::io::{ChanReader, ChanWriter};
use std::thread;
// ignore-pretty
+#![allow(unknown_features)]
+#![feature(box_syntax)]
#![feature(unboxed_closures)]
use std::sync::Arc;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
trait Trait<T> {
fn f(&self, x: T);
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
use std::io;
trait Trait {
// 4. `Bar for Box<Foo> <: Bar for Box<Foo:Send>` because
// `Box<Foo:Send> <: Box<Foo>`.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
trait Foo { }
struct SFoo;
impl Foo for SFoo { }
// test for #8664
+#![allow(unknown_features)]
+#![feature(box_syntax)]
pub trait Trait2<A> {
fn doit(&self);
// blanket impl for T:Copy coexists with an impl for Box<T>, because
// Box does not impl Copy.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
trait Get {
fn get(&self) -> Self;
}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
fn p_foo<T>(_pinned: T) { }
fn s_foo<T>(_shared: T) { }
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
// Example from lkuper's intern talk, August 2012 -- now with static
// methods!
use Color::{cyan, magenta, yellow, black};
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
// Example from lkuper's intern talk, August 2012.
use Color::{cyan, magenta, yellow, black};
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
struct Foo {
f: int,
}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
#![feature(unboxed_closures)]
use std::ops::FnMut;
// Test that the call operator autoderefs when calling to an object type.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
#![feature(unboxed_closures)]
use std::ops::FnMut;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
#![feature(unboxed_closures)]
use std::ops::FnMut;
// Test that unboxed closures in contexts with free type parameters
// monomorphize correctly (issue #16791)
+#![allow(unknown_features)]
+#![feature(box_syntax)]
#![feature(unboxed_closures)]
fn main(){
// Tests that the reexports of `FnOnce` et al from the prelude work.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
#![feature(unboxed_closures)]
fn main() {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
struct X {
a: int
// 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 mut i = box 1i;
// Should be a copy
// except according to those terms.
#![allow(dead_assignment)]
+#![allow(unknown_features)]
+#![feature(box_syntax)]
pub fn main() {
let i = box 1i;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
fn f<T>(t: T) -> T {
let t1 = t;
// 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 mut i;
i = box 1i;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
struct J { j: int }
pub fn main() {
// 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 i = box vec!(100i);
// 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 i = box 100i;
assert!(i == box 100i);
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
pub fn main() {
enum t { t1(int), t2(int), }
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
pub fn main() {
box 100i;
}
// 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 mut i = box 1i;
// Should be a copy
// 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 i = box 1i;
let j = i;
// 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 i = box 100i;
let j = i;
// 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 i = box 100i;
assert_eq!(*i, 100);
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
#![feature(box_syntax)]
struct Foo { a: int, b: int }
// 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 vec!(0i,0,0,0,0);
}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
fn f(i: Box<int>) {
assert_eq!(*i, 100);
}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
fn f(i: &mut Box<int>) {
*i = box 200;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
fn f(i: Box<int>) {
assert_eq!(*i, 100);
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
fn f() -> Box<int> {
box 100
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
fn test1() {
enum bar { u(Box<int>), w(int), }
// 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 mut a = vec!(box 10i);
// 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 vect = vec!(box 100i);
assert!(vect[0] == box 100);
// 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 _i = box 100i;
}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
use std::cmp::PartialEq;
fn sendable() {
// 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 i = box 100i;
println!("{}", i);
// Issue #961
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
fn altsimple() {
match box true {
_ => { }
// except according to those terms.
#![allow(unused_variable)]
+#![allow(unknown_features)]
+#![feature(box_syntax)]
pub fn main() {
let i = box 100i;
// 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 mut i;
i = box 100i;
// 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 i = box 100i;
let mut j;
// 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 mut i = box 0i;
*i = 1;
// Issue #5192
+#![allow(unknown_features)]
+#![feature(box_syntax)]
pub trait EventLoop { }
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
#![feature(box_syntax)]
struct Foo {a: int, b: uint}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
enum bar { u(Box<int>), w(int), }
pub fn main() {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
#![feature(box_syntax)]
fn simple() {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
struct X { x: int }
pub fn main() {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
use std::sync::mpsc::{channel, Sender};
use std::thread::Thread;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
use std::sync::mpsc::channel;
pub fn main() {
// 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;
pub fn main() {
//
// ignore-lexer-test FIXME #15879
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
// Test sized-ness checking in substitution.
// Unbounded.
// Test structs with always-unsized fields.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
use std::mem;
use std::raw;
// 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 1i;
let lam_move = |&:| {};
// Abstract: zero-fill to block after drop
#![allow(path_statement)]
+#![allow(unknown_features)]
+#![feature(box_syntax)]
pub fn main()
{
// 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;
fn f() {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
pub fn main() {
// Tests for indexing into box/& [T; n]
let x: [int; 3] = [1, 2, 3];
// 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 _quux: Box<Vec<uint>> = box Vec::new(); }