Skip to content

Commit 90e9d8e

Browse files
committed
test: Remove Freeze / NoFreeze from tests
1 parent b4ddee6 commit 90e9d8e

16 files changed

+32
-117
lines changed

src/test/auxiliary/trait_superkinds_in_metadata.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313

1414
#[crate_type="lib"];
1515

16-
pub trait RequiresFreeze : Freeze { }
17-
pub trait RequiresRequiresFreezeAndSend : RequiresFreeze + Send { }
16+
pub trait RequiresShare : Share { }
17+
pub trait RequiresRequiresShareAndSend : RequiresShare + Send { }
1818
pub trait RequiresPod : Pod { }

src/test/compile-fail/borrowck-borrow-of-mut-base-ptr.rs

-25
This file was deleted.

src/test/compile-fail/builtin-superkinds-in-metadata.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
// Mostly tests correctness of metadata.
1717

1818
extern crate trait_superkinds_in_metadata;
19-
use trait_superkinds_in_metadata::{RequiresRequiresFreezeAndSend, RequiresFreeze};
19+
use trait_superkinds_in_metadata::{RequiresRequiresShareAndSend, RequiresShare};
2020

2121
struct X<T>(T);
2222

23-
impl <T:Freeze> RequiresFreeze for X<T> { }
23+
impl <T:Share> RequiresShare for X<T> { }
2424

25-
impl <T:Freeze> RequiresRequiresFreezeAndSend for X<T> { } //~ ERROR cannot implement this trait
25+
impl <T:Share> RequiresRequiresShareAndSend for X<T> { } //~ ERROR cannot implement this trait
2626

2727
fn main() { }

src/test/compile-fail/builtin-superkinds-simple.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@
1313

1414
trait Foo : Send { }
1515

16-
impl <'a> Foo for &'a mut () { } //~ ERROR cannot implement this trait
17-
18-
trait Bar : Freeze { }
19-
20-
impl <'a> Bar for &'a mut () { } //~ ERROR cannot implement this trait
16+
impl <'a> Foo for &'a mut () { }
17+
//~^ ERROR which does not fulfill `Send`, cannot implement this trait
2118

2219
fn main() { }

src/test/compile-fail/closure-bounds-subtype.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
fn take_any(_: ||:) {
1313
}
1414

15-
fn take_const_owned(_: ||:Freeze+Send) {
15+
fn take_const_owned(_: ||:Share+Send) {
1616
}
1717

1818
fn give_any(f: ||:) {
@@ -21,7 +21,7 @@ fn give_any(f: ||:) {
2121

2222
fn give_owned(f: ||:Send) {
2323
take_any(f);
24-
take_const_owned(f); //~ ERROR expected bounds `Send+Freeze` but found bounds `Send`
24+
take_const_owned(f); //~ ERROR expected bounds `Send+Share` but found bounds `Send`
2525
}
2626

2727
fn main() {}

src/test/compile-fail/kindck-freeze.rs

-57
This file was deleted.

src/test/compile-fail/mutable-enum-indirect.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313

1414
use std::kinds::marker;
1515

16-
enum Foo { A(marker::NoFreeze) }
16+
enum Foo { A(marker::NoShare) }
1717

18-
fn bar<T: Freeze>(_: T) {}
18+
fn bar<T: Share>(_: T) {}
1919

2020
fn main() {
21-
let x = A(marker::NoFreeze);
21+
let x = A(marker::NoShare);
2222
bar(&x); //~ ERROR type parameter with an incompatible type
2323
}

src/test/compile-fail/proc-bounds.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
fn is_send<T: Send>() {}
12-
fn is_freeze<T: Freeze>() {}
12+
fn is_freeze<T: Share>() {}
1313
fn is_static<T: 'static>() {}
1414

1515
fn main() {

src/test/compile-fail/trait-bounds-cant-coerce.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ trait Foo {
1414
fn a(_x: ~Foo:Send) {
1515
}
1616

17-
fn c(x: ~Foo:Freeze+Send) {
17+
fn c(x: ~Foo:Share+Send) {
1818
a(x);
1919
}
2020

src/test/compile-fail/trait-bounds-sugar.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ fn a(_x: ~Foo) { // should be same as ~Foo:Send
1818
fn b(_x: &'static Foo) { // should be same as &'static Foo:'static
1919
}
2020

21-
fn c(x: ~Foo:Freeze) {
21+
fn c(x: ~Foo:Share) {
2222
a(x); //~ ERROR expected bounds `Send`
2323
}
2424

25-
fn d(x: &'static Foo:Freeze) {
25+
fn d(x: &'static Foo:Share) {
2626
b(x); //~ ERROR expected bounds `'static`
2727
}
2828

src/test/pretty/path-type-bounds.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
trait Tr { }
1414
impl Tr for int { }
1515

16-
fn foo(x: ~Tr: Freeze) -> ~Tr: Freeze { x }
16+
fn foo(x: ~Tr: Share) -> ~Tr: Share { x }
1717

1818
fn main() {
19-
let x: ~Tr: Freeze;
19+
let x: ~Tr: Share;
2020

21-
~1 as ~Tr: Freeze;
21+
~1 as ~Tr: Share;
2222
}
2323

src/test/run-pass/builtin-superkinds-capabilities-xc.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
// even when using them cross-crate.
1717

1818
extern crate trait_superkinds_in_metadata;
19-
use trait_superkinds_in_metadata::{RequiresRequiresFreezeAndSend, RequiresFreeze};
19+
use trait_superkinds_in_metadata::{RequiresRequiresShareAndSend, RequiresShare};
2020

2121
#[deriving(Eq)]
2222
struct X<T>(T);
2323

24-
impl <T: Freeze> RequiresFreeze for X<T> { }
25-
impl <T: Freeze+Send> RequiresRequiresFreezeAndSend for X<T> { }
24+
impl <T: Share> RequiresShare for X<T> { }
25+
impl <T: Share+Send> RequiresRequiresShareAndSend for X<T> { }
2626

27-
fn foo<T: RequiresRequiresFreezeAndSend>(val: T, chan: Sender<T>) {
27+
fn foo<T: RequiresRequiresShareAndSend>(val: T, chan: Sender<T>) {
2828
chan.send(val);
2929
}
3030

src/test/run-pass/builtin-superkinds-in-metadata.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
// Tests (correct) usage of trait super-builtin-kinds cross-crate.
1616

1717
extern crate trait_superkinds_in_metadata;
18-
use trait_superkinds_in_metadata::{RequiresRequiresFreezeAndSend, RequiresFreeze};
18+
use trait_superkinds_in_metadata::{RequiresRequiresShareAndSend, RequiresShare};
1919
use trait_superkinds_in_metadata::{RequiresPod};
2020

2121
struct X<T>(T);
2222

23-
impl <T:Freeze> RequiresFreeze for X<T> { }
23+
impl <T:Share> RequiresShare for X<T> { }
2424

25-
impl <T:Freeze+Send> RequiresRequiresFreezeAndSend for X<T> { }
25+
impl <T:Share+Send> RequiresRequiresShareAndSend for X<T> { }
2626

2727
impl <T:Pod> RequiresPod for X<T> { }
2828

src/test/run-pass/proc-bounds.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@ fn foo<T>() {}
1212
fn bar<T>(_: T) {}
1313

1414
fn is_send<T: Send>() {}
15-
fn is_freeze<T: Freeze>() {}
15+
fn is_freeze<T: Share>() {}
1616
fn is_static<T: 'static>() {}
1717

1818
pub fn main() {
1919
foo::<proc()>();
2020
foo::<proc:()>();
2121
foo::<proc:Send()>();
22-
foo::<proc:Send + Freeze()>();
23-
foo::<proc:'static + Send + Freeze()>();
22+
foo::<proc:Send + Share()>();
23+
foo::<proc:'static + Send + Share()>();
2424

2525
is_send::<proc:Send()>();
26-
is_freeze::<proc:Freeze()>();
26+
is_freeze::<proc:Share()>();
2727
is_static::<proc:'static()>();
2828

2929

src/test/run-pass/trait-bounds-basic.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fn a(_x: ~Foo:) {
1717
fn b(_x: ~Foo:Send) {
1818
}
1919

20-
fn c(x: ~Foo:Freeze+Send) {
20+
fn c(x: ~Foo:Share+Send) {
2121
a(x);
2222
}
2323

src/test/run-pass/trait-bounds-in-arc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// except according to those terms.
1212

1313
// Tests that a heterogeneous list of existential types can be put inside an Arc
14-
// and shared between tasks as long as all types fulfill Freeze+Send.
14+
// and shared between tasks as long as all types fulfill Send.
1515

1616
// ignore-fast
1717

0 commit comments

Comments
 (0)