auto merge of #10032 : thestinger/rust/snapshot, r=huonw

This commit is contained in:
bors 2013-10-23 15:11:07 -07:00
commit e2428b791c
218 changed files with 395 additions and 60 deletions

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
pub struct Entry<A,B> {
key: A,
value: B

View file

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
#[link(name = "crate_method_reexport_grrrrrrr2")];
pub use name_pool::add;

View file

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
#[link(name = "a", vers = "0.0")];
#[crate_type = "lib"];

View file

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
#[link(name = "req")];
#[crate_type = "lib"];

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
/* -*- mode: rust; indent-tabs-mode: nil -*-
* Implementation of 'fasta' benchmark from

View file

@ -10,6 +10,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
extern mod extra;
use std::io::{ReaderUtil, WriterUtil};

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
extern mod extra;
use extra::list::{List, Cons, Nil};

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
struct clam {
x: @int,
y: @int,

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
fn main() {
struct A {
a: int,

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
struct foo(~int);
fn borrow(x: @mut foo) {

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
trait Foo {
fn borrowed<'a>(&'a self) -> &'a ();
}

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
trait Foo {
fn borrowed(&self);
fn borrowed_mut(&mut self);

View file

@ -1,3 +1,5 @@
#[feature(managed_boxes)];
fn f<T>(x: T) -> @T {
@x //~ ERROR value may contain borrowed pointers
}

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
trait T {
fn foo(@mut self);
}

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
trait noisy {
fn speak(&self);
}

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
type Foo = @[u8];
impl Drop for Foo { //~ ERROR the Drop trait may only be implemented

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
fn wants_box(x: @str) { }
fn wants_uniq(x: ~str) { }
fn wants_slice(x: &str) { }

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
fn wants_box(x: @[uint]) { }
fn wants_uniq(x: ~[uint]) { }
fn wants_three(x: [uint, ..3]) { }

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
fn takes_mut(x: @mut int) { }
fn takes_imm(x: @int) { }

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
// test that autoderef of a type like this does not
// cause compiler to loop. Note that no instances
// of such a type could ever be constructed.

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
// A test case for #2548.
struct foo {

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
struct P { child: Option<@mut P> }
trait PTrait {
fn getChildOption(&self) -> Option<@P>;

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
// error-pattern: type `@Foo:'static` does not implement any method in scope named `foo`
trait Foo {

View file

@ -1,3 +1,5 @@
#[feature(managed_boxes)];
struct Foo {
f: @mut int,
}

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
fn foo(_x: @uint) {}
fn main() {

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
trait repeat<A> { fn get(&self) -> A; }
impl<A:Clone> repeat<A> for @A {

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
trait foo { fn foo(&self); }
fn to_foo<T:Clone + foo>(t: T) -> @foo {

View file

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
#[forbid(heap_memory)];
struct Foo {

View file

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
#[forbid(managed_heap_memory)];
struct Foo {

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
fn two_args<T>(x: T, y: T) { }
fn main() {

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
use std::container::Map;
use std::hashmap::HashMap;

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
use std::cell::Cell;
use std::task;

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
// Test that an object type `@Foo` is not considered to implement the
// trait `Foo`. Issue #5087.

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
trait Foo {
fn borrowed(&self);
fn borrowed_mut(&mut self);

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
struct r {
i: @mut int,
}

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
struct point {
x: int,
y: int,

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
fn borrow<'r, T>(x: &'r T) -> &'r T {x}
fn foo(cond: &fn() -> bool, box: &fn() -> @int) {

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
struct invariant<'self> {
f: @mut &'self int
}

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
struct invariant<'self> {
f: @mut [&'self int]
}

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
struct invariant<'self> {
f: &'static fn(x: @mut &'self int)
}

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
struct invariant<'self> {
f: &'static fn() -> @mut &'self int
}

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
struct invariant<'self> {
f: @mut &'self int
}

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
// Check that we correctly infer that b and c must be region
// parameterized because they reference a which requires a region.

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
struct ctxt { v: uint }
trait get_ctxt {

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
trait add {
fn plus(&self, x: Self) -> Self;
}

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
struct foo {
a: int,
b: int,

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
// Tests for "default" bounds inferred for traits with no bounds list.
trait Foo {

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
trait Mumbo {
fn jumbo(&self, x: @uint) -> uint;
}

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
trait bar { fn dup(&self) -> Self; fn blah<X>(&self); }
impl bar for int { fn dup(&self) -> int { *self } fn blah<X>(&self) {} }
impl bar for uint { fn dup(&self) -> uint { *self } fn blah<X>(&self) {} }

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
struct r {
i: @mut int,
}

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
// error-pattern:unreachable pattern
enum foo { a(@foo, int), b(uint), }

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
// Test that a class with an unsendable field can't be
// sent

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
// Gdb doesn't know about UTF-32 character encoding and will print a rust char as only
// its numerical value.

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
// compile-flags:-Z extra-debug-info
// debugger:rbreak zzz
// debugger:run

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
// compile-flags:-Z extra-debug-info
// debugger:rbreak zzz
// debugger:run

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
// compile-flags:-Z extra-debug-info
// debugger:rbreak zzz
// debugger:run

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
// compile-flags:-Z extra-debug-info
// debugger:rbreak zzz
// debugger:run

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
// compile-flags:-Z extra-debug-info
// debugger:rbreak zzz
// debugger:run

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
// compile-flags:-Z extra-debug-info
// debugger:set print pretty off
// debugger:rbreak zzz

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
// compile-flags:-Z extra-debug-info
// debugger:set print pretty off
// debugger:rbreak zzz

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
// compile-flags:-Z extra-debug-info
// debugger:run

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
// error-pattern:meep
fn f(_a: int, _b: int, _c: @int) { fail!("moop"); }

View file

@ -1,3 +1,5 @@
#[feature(managed_boxes)];
// error-pattern:borrowed
trait Foo {

View file

@ -1,3 +1,5 @@
#[feature(managed_boxes)];
// error-pattern:borrowed
trait Foo {

View file

@ -1,3 +1,5 @@
#[feature(managed_boxes)];
// error-pattern:borrowed
// Test that write guards trigger when mut box is frozen

View file

@ -1,3 +1,5 @@
#[feature(managed_boxes)];
// error-pattern:borrowed
// Test that if you imm borrow then mut borrow it fails.

View file

@ -1,3 +1,5 @@
#[feature(managed_boxes)];
// error-pattern:borrowed
// Test that if you mut borrow then imm borrow it fails.

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
// error-pattern:explicit failure
// Issue #2272 - unwind this without leaking the unique pointer

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
// error-pattern:fail
fn failfn() {

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
// error-pattern:fail
fn failfn() {

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
// error-pattern:fail
fn f() -> @int { fail!(); }

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
// error-pattern:fail
fn main() {

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
// error-pattern:fail
fn main() {

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
// error-pattern:fail
fn f(_a: @int) {
fail!();

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
// error-pattern:squirrel
struct r {

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
// error-pattern:quux
struct faily_box {

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
// error-pattern:fail
fn fold_local() -> @~[int]{

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
// error-pattern:fail
fn fold_local() -> @~[int]{

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
struct pair<A,B> {
a: A, b: B
}

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
struct Pair<A,B> {
a: A, b: B
}

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
trait double {
fn double(@self) -> uint;
}

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
trait double {
fn double(self) -> uint;
}

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
trait double {
fn double(@self) -> uint;
}

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
trait Foo {
fn foo(&self) -> ~str;
}

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
use std::borrow;
use std::ptr;

View file

@ -10,6 +10,8 @@
// exec-env:RUST_POISON_ON_FREE=1
#[feature(managed_boxes)];
pub fn main() {
let x: @mut @Option<~int> = @mut @None;
match x {

View file

@ -10,6 +10,8 @@
// exec-env:RUST_POISON_ON_FREE=1
#[feature(managed_boxes)];
fn switcher(x: Option<@int>) {
let mut x = x;
match x {

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
struct F { f: @G }
struct G { g: ~[int] }

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
fn borrow<'r,T>(x: &'r T) -> &'r T {x}
struct Rec { f: @int }

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
pub fn main() {
let i: (@int, int) = (@10, 10);
let (_a, _) = i;

View file

@ -8,9 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// -*- rust -*-
#[feature(managed_boxes)];
fn some_box(x: int) -> @int { return @x; }

View file

@ -8,9 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// -*- rust -*-
#[feature(managed_boxes)];
fn some_box(x: int) -> @int { return @x; }

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
struct Foo {a: int, b: uint}
enum bar { u(@Foo), w(int), }

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
struct Box<T> {c: @T}

View file

@ -8,6 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
pub fn main() { let x: @int = @10; assert!((*x == 10)); }

View file

@ -11,6 +11,8 @@
// Regression test that rustc doesn't recurse infinitely substituting
// the boxed type parameter
#[feature(managed_boxes)];
struct Tree<T> {
parent: Option<T>
}

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
trait Foo {
fn foo(@self);
}

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
trait T {
fn foo(@mut self);
}

View file

@ -11,7 +11,7 @@
// xfail-fast - check-fast doesn't understand aux-build
// aux-build:cci_nested_lib.rs
#[feature(globs)];
#[feature(globs, managed_boxes)];
extern mod cci_nested_lib;
use cci_nested_lib::*;

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[feature(managed_boxes)];
// xfail-fast
// aux-build:cci_class_cast.rs
extern mod cci_class_cast;

Some files were not shown because too many files have changed in this diff Show more