about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-06-16 08:16:49 +0000
committerbors <bors@rust-lang.org>2014-06-16 08:16:49 +0000
commit7ec78053ec5fcabd5f8ca98627dd45bfa5fc4cd4 (patch)
tree1ea55f8c25540e7339e27fe9dd79cadbc332634f /src/test
parent2ef910f71ab83761b1f5f9144621f246622e92d8 (diff)
parent89b0e6e12ba2fb24ec0e6655a1130c16eb8d1745 (diff)
downloadrust-7ec78053ec5fcabd5f8ca98627dd45bfa5fc4cd4.tar.gz
rust-7ec78053ec5fcabd5f8ca98627dd45bfa5fc4cd4.zip
auto merge of #14900 : alexcrichton/rust/snapshots, r=huonw
Closes #14898
Closes #14918
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compile-fail/issue-7013.rs2
-rw-r--r--src/test/compile-fail/kindck-owned-trait-contains.rs4
-rw-r--r--src/test/compile-fail/owned-ptr-static-bound.rs12
-rw-r--r--src/test/compile-fail/regions-bound-lists-feature-gate.rs2
-rw-r--r--src/test/compile-fail/trait-bounds-not-on-bare-trait.rs2
-rw-r--r--src/test/compile-fail/trait-bounds-not-on-impl.rs2
-rw-r--r--src/test/compile-fail/trait-bounds-not-on-struct.rs2
-rw-r--r--src/test/run-pass/alignment-gep-tup-like-1.rs4
-rw-r--r--src/test/run-pass/issue-2734.rs4
-rw-r--r--src/test/run-pass/issue-2735.rs4
-rw-r--r--src/test/run-pass/issue-7673-cast-generically-implemented-trait.rs6
-rw-r--r--src/test/run-pass/kindck-owned-trait-contains-1.rs4
-rw-r--r--src/test/run-pass/objects-owned-object-borrowed-method-header.rs8
-rw-r--r--src/test/run-pass/objects-owned-object-owned-method.rs2
-rw-r--r--src/test/run-pass/parameterized-trait-with-bounds.rs10
-rw-r--r--src/test/run-pass/regions-bound-lists-feature-gate.rs4
16 files changed, 36 insertions, 36 deletions
diff --git a/src/test/compile-fail/issue-7013.rs b/src/test/compile-fail/issue-7013.rs
index 3028db00f58..bff8ba629aa 100644
--- a/src/test/compile-fail/issue-7013.rs
+++ b/src/test/compile-fail/issue-7013.rs
@@ -27,7 +27,7 @@ impl Foo for B {
 }
 
 struct A {
-    v: Box<Foo:Send>,
+    v: Box<Foo + Send>,
 }
 
 fn main() {
diff --git a/src/test/compile-fail/kindck-owned-trait-contains.rs b/src/test/compile-fail/kindck-owned-trait-contains.rs
index 3f6c622dd0d..6921acde45e 100644
--- a/src/test/compile-fail/kindck-owned-trait-contains.rs
+++ b/src/test/compile-fail/kindck-owned-trait-contains.rs
@@ -15,8 +15,8 @@ impl<A:Clone> Repeat<A> for A {
     fn get(&self) -> A { self.clone() }
 }
 
-fn repeater<A:Clone>(v: A) -> Box<Repeat<A>:> {
-    box v as Box<Repeat<A>:> // No
+fn repeater<A:Clone>(v: A) -> Box<Repeat<A>> {
+    box v as Box<Repeat<A>> // No
 }
 
 fn main() {
diff --git a/src/test/compile-fail/owned-ptr-static-bound.rs b/src/test/compile-fail/owned-ptr-static-bound.rs
index 48f04c33494..dc6e8b1d6be 100644
--- a/src/test/compile-fail/owned-ptr-static-bound.rs
+++ b/src/test/compile-fail/owned-ptr-static-bound.rs
@@ -15,16 +15,16 @@ struct B<'a, T>(&'a A<T>);
 trait X {}
 impl<'a, T> X for B<'a, T> {}
 
-fn f<'a, T, U>(v: Box<A<T>>) -> Box<X:> {
-    box B(v) as Box<X:> //~ ERROR value may contain references; add `'static` bound to `T`
+fn f<'a, T, U>(v: Box<A<T>>) -> Box<X> {
+    box B(v) as Box<X> //~ ERROR value may contain references; add `'static` bound to `T`
 }
 
-fn g<'a, T, U>(v: Box<A<U>>) -> Box<X:> {
-    box B(v) as Box<X:> //~ ERROR value may contain references; add `'static` bound to `U`
+fn g<'a, T, U>(v: Box<A<U>>) -> Box<X> {
+    box B(v) as Box<X> //~ ERROR value may contain references; add `'static` bound to `U`
 }
 
-fn h<'a, T: 'static>(v: Box<A<T>>) -> Box<X:> {
-    box B(v) as Box<X:> // ok
+fn h<'a, T: 'static>(v: Box<A<T>>) -> Box<X> {
+    box B(v) as Box<X> // ok
 }
 
 fn main() {}
diff --git a/src/test/compile-fail/regions-bound-lists-feature-gate.rs b/src/test/compile-fail/regions-bound-lists-feature-gate.rs
index aa398bcd557..de3b2faef86 100644
--- a/src/test/compile-fail/regions-bound-lists-feature-gate.rs
+++ b/src/test/compile-fail/regions-bound-lists-feature-gate.rs
@@ -11,7 +11,7 @@
 
 trait Foo { }
 
-fn foo<'a>(x: Box<Foo:'a>) { //~ ERROR only the 'static lifetime is accepted here
+fn foo<'a>(x: Box<Foo + 'a>) { //~ ERROR only the 'static lifetime is accepted here
 }
 
 fn bar<'a, T:'a>() { //~ ERROR only the 'static lifetime is accepted here
diff --git a/src/test/compile-fail/trait-bounds-not-on-bare-trait.rs b/src/test/compile-fail/trait-bounds-not-on-bare-trait.rs
index 435c90c7830..f0f388a5a07 100644
--- a/src/test/compile-fail/trait-bounds-not-on-bare-trait.rs
+++ b/src/test/compile-fail/trait-bounds-not-on-bare-trait.rs
@@ -13,7 +13,7 @@ trait Foo {
 
 // This should emit the less confusing error, not the more confusing one.
 
-fn foo(_x: Foo:Send) {
+fn foo(_x: Foo + Send) {
     //~^ERROR reference to trait `Foo` where a type is expected; try `Box<Foo>` or `&Foo`
 }
 
diff --git a/src/test/compile-fail/trait-bounds-not-on-impl.rs b/src/test/compile-fail/trait-bounds-not-on-impl.rs
index ac88b21b456..38c78144601 100644
--- a/src/test/compile-fail/trait-bounds-not-on-impl.rs
+++ b/src/test/compile-fail/trait-bounds-not-on-impl.rs
@@ -13,7 +13,7 @@ trait Foo {
 
 struct Bar;
 
-impl Foo:Owned for Bar { //~ ERROR bounded traits are only valid in type position
+impl Foo + Owned for Bar { //~ ERROR bounded traits are only valid in type position
 }
 
 fn main() { }
diff --git a/src/test/compile-fail/trait-bounds-not-on-struct.rs b/src/test/compile-fail/trait-bounds-not-on-struct.rs
index be5375d2938..0a5909ff2ef 100644
--- a/src/test/compile-fail/trait-bounds-not-on-struct.rs
+++ b/src/test/compile-fail/trait-bounds-not-on-struct.rs
@@ -11,6 +11,6 @@
 
 struct Foo;
 
-fn foo(_x: Box<Foo:Send>) { } //~ ERROR kind bounds can only be used on trait types
+fn foo(_x: Box<Foo + Send>) { } //~ ERROR kind bounds can only be used on trait types
 
 fn main() { }
diff --git a/src/test/run-pass/alignment-gep-tup-like-1.rs b/src/test/run-pass/alignment-gep-tup-like-1.rs
index 4fa695de522..dec53672d87 100644
--- a/src/test/run-pass/alignment-gep-tup-like-1.rs
+++ b/src/test/run-pass/alignment-gep-tup-like-1.rs
@@ -29,11 +29,11 @@ impl<A:Clone> Invokable<A> for Invoker<A> {
     }
 }
 
-fn f<A:Clone + 'static>(a: A, b: u16) -> Box<Invokable<A>:> {
+fn f<A:Clone + 'static>(a: A, b: u16) -> Box<Invokable<A>> {
     box Invoker {
         a: a,
         b: b,
-    } as (Box<Invokable<A>>+)
+    } as (Box<Invokable<A>>)
 }
 
 pub fn main() {
diff --git a/src/test/run-pass/issue-2734.rs b/src/test/run-pass/issue-2734.rs
index 3422b9a799d..e331173a158 100644
--- a/src/test/run-pass/issue-2734.rs
+++ b/src/test/run-pass/issue-2734.rs
@@ -12,8 +12,8 @@
 trait hax { }
 impl<A> hax for A { }
 
-fn perform_hax<T: 'static>(x: Box<T>) -> Box<hax:> {
-    box x as Box<hax:>
+fn perform_hax<T: 'static>(x: Box<T>) -> Box<hax> {
+    box x as Box<hax>
 }
 
 fn deadcode() {
diff --git a/src/test/run-pass/issue-2735.rs b/src/test/run-pass/issue-2735.rs
index 8a5391773bb..622b35b93ae 100644
--- a/src/test/run-pass/issue-2735.rs
+++ b/src/test/run-pass/issue-2735.rs
@@ -12,8 +12,8 @@
 trait hax { }
 impl<A> hax for A { }
 
-fn perform_hax<T: 'static>(x: Box<T>) -> Box<hax:> {
-    box x as Box<hax:>
+fn perform_hax<T: 'static>(x: Box<T>) -> Box<hax> {
+    box x as Box<hax>
 }
 
 fn deadcode() {
diff --git a/src/test/run-pass/issue-7673-cast-generically-implemented-trait.rs b/src/test/run-pass/issue-7673-cast-generically-implemented-trait.rs
index 7cd7e70be74..47a09d55438 100644
--- a/src/test/run-pass/issue-7673-cast-generically-implemented-trait.rs
+++ b/src/test/run-pass/issue-7673-cast-generically-implemented-trait.rs
@@ -20,6 +20,6 @@ pub fn main() {}
 trait A {}
 impl<T: 'static> A for T {}
 
-fn owned1<T: 'static>(a: T) { box a as Box<A:>; } /* note `:` */
-fn owned2<T: 'static>(a: Box<T>) { a as Box<A:>; }
-fn owned3<T: 'static>(a: Box<T>) { box a as Box<A:>; }
+fn owned1<T: 'static>(a: T) { box a as Box<A+>; } /* note `:` */
+fn owned2<T: 'static>(a: Box<T>) { a as Box<A>; }
+fn owned3<T: 'static>(a: Box<T>) { box a as Box<A>; }
diff --git a/src/test/run-pass/kindck-owned-trait-contains-1.rs b/src/test/run-pass/kindck-owned-trait-contains-1.rs
index 3dae50bda33..ed8115cd6ca 100644
--- a/src/test/run-pass/kindck-owned-trait-contains-1.rs
+++ b/src/test/run-pass/kindck-owned-trait-contains-1.rs
@@ -17,9 +17,9 @@ impl<A:Clone + 'static> repeat<A> for Box<A> {
     }
 }
 
-fn repeater<A:Clone + 'static>(v: Box<A>) -> Box<repeat<A>:> {
+fn repeater<A:Clone + 'static>(v: Box<A>) -> Box<repeat<A>> {
     // Note: owned kind is not necessary as A appears in the trait type
-    box v as Box<repeat<A>:> // No
+    box v as Box<repeat<A>> // No
 }
 
 pub fn main() {
diff --git a/src/test/run-pass/objects-owned-object-borrowed-method-header.rs b/src/test/run-pass/objects-owned-object-borrowed-method-header.rs
index be1b135ddc9..815488b8c66 100644
--- a/src/test/run-pass/objects-owned-object-borrowed-method-header.rs
+++ b/src/test/run-pass/objects-owned-object-borrowed-method-header.rs
@@ -31,10 +31,10 @@ impl FooTrait for BarStruct {
 }
 
 pub fn main() {
-    let foos: Vec<Box<FooTrait:>> = vec!(
-        box BarStruct{ x: box(GC) 0 } as Box<FooTrait:>,
-        box BarStruct{ x: box(GC) 1 } as Box<FooTrait:>,
-        box BarStruct{ x: box(GC) 2 } as Box<FooTrait:>
+    let foos: Vec<Box<FooTrait>> = vec!(
+        box BarStruct{ x: box(GC) 0 } as Box<FooTrait>,
+        box BarStruct{ x: box(GC) 1 } as Box<FooTrait>,
+        box BarStruct{ x: box(GC) 2 } as Box<FooTrait>
     );
 
     for i in range(0u, foos.len()) {
diff --git a/src/test/run-pass/objects-owned-object-owned-method.rs b/src/test/run-pass/objects-owned-object-owned-method.rs
index cac132b8e36..540593c43fb 100644
--- a/src/test/run-pass/objects-owned-object-owned-method.rs
+++ b/src/test/run-pass/objects-owned-object-owned-method.rs
@@ -28,6 +28,6 @@ impl FooTrait for BarStruct {
 }
 
 pub fn main() {
-    let foo = box BarStruct{ x: 22 } as Box<FooTrait:>;
+    let foo = box BarStruct{ x: 22 } as Box<FooTrait>;
     assert_eq!(22, foo.foo());
 }
diff --git a/src/test/run-pass/parameterized-trait-with-bounds.rs b/src/test/run-pass/parameterized-trait-with-bounds.rs
index 6f33fb470e7..fbc28298165 100644
--- a/src/test/run-pass/parameterized-trait-with-bounds.rs
+++ b/src/test/run-pass/parameterized-trait-with-bounds.rs
@@ -19,10 +19,10 @@ mod foo {
     pub trait D<'a, T> {}
 }
 
-fn foo1<T>(_: &A<T>: Send) {}
-fn foo2<T>(_: Box<A<T>: Send + Share>) {}
-fn foo3<T>(_: Box<B<int, uint>: 'static>) {}
-fn foo4<'a, T>(_: Box<C<'a, T>: 'static + Send>) {}
-fn foo5<'a, T>(_: Box<foo::D<'a, T>: 'static + Send>) {}
+fn foo1<T>(_: &A<T> + Send) {}
+fn foo2<T>(_: Box<A<T> + Send + Share>) {}
+fn foo3<T>(_: Box<B<int, uint> + 'static>) {}
+fn foo4<'a, T>(_: Box<C<'a, T> + 'static + Send>) {}
+fn foo5<'a, T>(_: Box<foo::D<'a, T> + 'static + Send>) {}
 
 pub fn main() {}
diff --git a/src/test/run-pass/regions-bound-lists-feature-gate.rs b/src/test/run-pass/regions-bound-lists-feature-gate.rs
index 3e23c1d4d64..c5baecf7272 100644
--- a/src/test/run-pass/regions-bound-lists-feature-gate.rs
+++ b/src/test/run-pass/regions-bound-lists-feature-gate.rs
@@ -15,10 +15,10 @@
 
 trait Foo { }
 
-fn foo<'a>(x: Box<Foo:'a>) {
+fn foo<'a>(x: Box<Foo + 'a>) {
 }
 
-fn bar<'a, T:'a>() {
+fn bar<'a, T: 'a>() {
 }
 
 pub fn main() { }