Skip to content

Commit f0e8c81

Browse files
committed
---
yaml --- r: 39623 b: refs/heads/incoming c: f67c372 h: refs/heads/master i: 39621: fede50f 39619: 6c95e29 39615: ffe62f5 v: v3
1 parent 46e1ab0 commit f0e8c81

23 files changed

+136
-161
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 3d5418789064fdb463e872a4e651af1c628a3650
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278
9-
refs/heads/incoming: 4e07a6385d2e170da905acc77871024e3fa06b90
9+
refs/heads/incoming: f67c37263e9dd625ab7f91c661464b5f14a584af
1010
refs/heads/dist-snap: 22efa39382d41b084fde1719df7ae8ce5697d8c9
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/src/test/auxiliary/cci_capture_clause.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#[legacy_exports];
12-
13-
export foo;
14-
1511
use core::oldcomm::*;
1612

17-
fn foo<T: Owned Copy>(x: T) -> Port<T> {
13+
pub fn foo<T: Owned Copy>(x: T) -> Port<T> {
1814
let p = Port();
1915
let c = Chan(&p);
2016
do task::spawn() |copy c, copy x| {

branches/incoming/src/test/auxiliary/cci_class_cast.rs

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,13 @@ use to_str::*;
1414
use to_str::ToStr;
1515

1616
mod kitty {
17-
#[legacy_exports];
18-
19-
struct cat {
20-
priv mut meows : uint,
21-
mut how_hungry : int,
22-
name : ~str,
23-
}
17+
pub struct cat {
18+
priv mut meows : uint,
19+
mut how_hungry : int,
20+
name : ~str,
21+
}
2422

25-
impl cat : ToStr {
23+
pub impl cat : ToStr {
2624
pure fn to_str() -> ~str { copy self.name }
2725
}
2826

@@ -37,7 +35,7 @@ struct cat {
3735

3836
}
3937

40-
impl cat {
38+
pub impl cat {
4139
fn speak() { self.meow(); }
4240

4341
fn eat() -> bool {
@@ -52,14 +50,14 @@ struct cat {
5250
}
5351
}
5452
}
55-
fn cat(in_x : uint, in_y : int, in_name: ~str) -> cat {
56-
cat {
57-
meows: in_x,
58-
how_hungry: in_y,
59-
name: in_name
60-
}
61-
}
6253

54+
pub fn cat(in_x : uint, in_y : int, in_name: ~str) -> cat {
55+
cat {
56+
meows: in_x,
57+
how_hungry: in_y,
58+
name: in_name
59+
}
60+
}
6361
}
6462

6563

branches/incoming/src/test/auxiliary/issue-2631-a.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,15 @@
1010

1111
#[link(name = "req")];
1212
#[crate_type = "lib"];
13-
#[legacy_exports];
1413

1514
extern mod std;
1615

17-
use dvec::*;
18-
use dvec::DVec;
16+
use core::dvec::*;
1917
use std::map::HashMap;
2018

21-
type header_map = HashMap<~str, @DVec<@~str>>;
19+
pub type header_map = HashMap<~str, @DVec<@~str>>;
2220

2321
// the unused ty param is necessary so this gets monomorphized
24-
fn request<T: Copy>(req: header_map) {
22+
pub fn request<T: Copy>(req: header_map) {
2523
let _x = copy *(copy *req.get(~"METHOD"))[0u];
2624
}

branches/incoming/src/test/auxiliary/static-methods-crate.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@
1212
vers = "0.1")];
1313

1414
#[crate_type = "lib"];
15-
#[legacy_exports];
16-
export read, readMaybe;
1715

18-
trait read {
16+
pub trait read {
1917
static fn readMaybe(s: ~str) -> Option<self>;
2018
}
2119

@@ -35,7 +33,7 @@ impl bool: read {
3533
}
3634
}
3735

38-
fn read<T: read Copy>(s: ~str) -> T {
36+
pub fn read<T: read Copy>(s: ~str) -> T {
3937
match read::readMaybe(s) {
4038
Some(x) => x,
4139
_ => fail ~"read failed!"

branches/incoming/src/test/auxiliary/static_fn_inline_xc_aux.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub mod num {
1616
}
1717

1818
pub mod float {
19-
impl float: num::Num2 {
19+
impl float: ::num::Num2 {
2020
#[inline]
2121
static pure fn from_int2(n: int) -> float { return n as float; }
2222
}

branches/incoming/src/test/auxiliary/static_fn_trait_xc_aux.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pub mod num {
55
}
66

77
pub mod float {
8-
impl float: num::Num2 {
8+
impl float: ::num::Num2 {
99
static pure fn from_int2(n: int) -> float { return n as float; }
1010
}
11-
}
11+
}

branches/incoming/src/test/auxiliary/test_comm.rs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,8 @@
1313
1414
Could probably be more minimal.
1515
*/
16-
#[legacy_exports];
1716

18-
use libc::size_t;
19-
20-
export port;
21-
export recv;
17+
use core::libc::size_t;
2218

2319

2420
/**
@@ -28,12 +24,12 @@ export recv;
2824
* transmitted. If a port value is copied, both copies refer to the same
2925
* port. Ports may be associated with multiple `chan`s.
3026
*/
31-
enum port<T: Owned> {
27+
pub enum port<T: Owned> {
3228
port_t(@port_ptr<T>)
3329
}
3430

3531
/// Constructs a port
36-
fn port<T: Owned>() -> port<T> {
32+
pub fn port<T: Owned>() -> port<T> {
3733
port_t(@port_ptr(rustrt::new_port(sys::size_of::<T>() as size_t)))
3834
}
3935

@@ -74,11 +70,11 @@ fn port_ptr<T: Owned>(po: *rust_port) -> port_ptr<T> {
7470
* Receive from a port. If no data is available on the port then the
7571
* task will block until data becomes available.
7672
*/
77-
fn recv<T: Owned>(p: port<T>) -> T { recv_((**p).po) }
73+
pub fn recv<T: Owned>(p: port<T>) -> T { recv_((**p).po) }
7874

7975

8076
/// Receive on a raw port pointer
81-
fn recv_<T: Owned>(p: *rust_port) -> T {
77+
pub fn recv_<T: Owned>(p: *rust_port) -> T {
8278
let yield = 0;
8379
let yieldp = ptr::addr_of(&yield);
8480
let mut res;

branches/incoming/src/test/run-pass/auto-encode.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ use std::serialize::{Encodable, Decodable};
2626
use std::prettyprint;
2727
use std::time;
2828

29-
fn test_prettyprint<A: Encodable<prettyprint::Encoder>>(
29+
fn test_prettyprint<A: Encodable<prettyprint::Serializer>>(
3030
a: &A,
3131
expected: &~str
3232
) {
3333
let s = do io::with_str_writer |w| {
34-
a.encode(&prettyprint::Encoder(w))
34+
a.encode(&prettyprint::Serializer(w))
3535
};
3636
debug!("s == %?", s);
3737
assert s == *expected;

branches/incoming/src/test/run-pass/cci_capture_clause.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
extern mod cci_capture_clause;
2020

21-
use oldcomm::recv;
21+
use core::oldcomm::recv;
2222

2323
fn main() {
2424
cci_capture_clause::foo(()).recv()

branches/incoming/src/test/run-pass/class-separate-impl.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
// except according to those terms.
1010

1111
// xfail-fast
12-
use to_str::*;
13-
use to_str::ToStr;
12+
use core::to_str::*;
1413

1514
struct cat {
1615
priv mut meows : uint,

branches/incoming/src/test/run-pass/export-non-interference3.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,11 @@
99
// except according to those terms.
1010

1111
mod foo {
12-
#[legacy_exports];
13-
export x;
14-
15-
fn x() { bar::x(); }
12+
pub fn x() { bar::x(); }
1613
}
1714

1815
mod bar {
19-
#[legacy_exports];
20-
export x;
21-
22-
fn x() { debug!("x"); }
16+
pub fn x() { debug!("x"); }
2317
}
2418

2519
fn main() { foo::x(); }

branches/incoming/src/test/run-pass/hashmap-memory.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,12 @@ use oldcomm::recv;
2828
fn map(filename: ~str, emit: map_reduce::putter) { emit(filename, ~"1"); }
2929

3030
mod map_reduce {
31-
#[legacy_exports];
32-
export putter;
33-
export mapper;
34-
export map_reduce;
31+
use std::map;
32+
use std::map::HashMap;
3533

36-
type putter = fn@(~str, ~str);
34+
pub type putter = fn@(~str, ~str);
3735

38-
type mapper = extern fn(~str, putter);
36+
pub type mapper = extern fn(~str, putter);
3937

4038
enum ctrl_proto { find_reducer(~[u8], Chan<int>), mapper_done, }
4139

@@ -70,7 +68,7 @@ mod map_reduce {
7068
send(ctrl, mapper_done);
7169
}
7270

73-
fn map_reduce(inputs: ~[~str]) {
71+
pub fn map_reduce(inputs: ~[~str]) {
7472
let ctrl = Port();
7573

7674
// This task becomes the master control task. It spawns others

branches/incoming/src/test/run-pass/import-glob-crate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313

1414
extern mod std;
15-
use vec::*;
15+
use core::vec::*;
1616

1717
fn main() {
1818
let mut v = from_elem(0u, 0);

branches/incoming/src/test/run-pass/intrinsic-alignment.rs

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,24 @@ extern mod rusti {
2121
#[cfg(target_os = "macos")]
2222
#[cfg(target_os = "freebsd")]
2323
mod m {
24-
#[legacy_exports];
2524
#[cfg(target_arch = "x86")]
26-
fn main() {
27-
assert rusti::pref_align_of::<u64>() == 8u;
28-
assert rusti::min_align_of::<u64>() == 4u;
25+
pub fn main() {
26+
assert ::rusti::pref_align_of::<u64>() == 8u;
27+
assert ::rusti::min_align_of::<u64>() == 4u;
2928
}
3029

3130
#[cfg(target_arch = "x86_64")]
32-
fn main() {
33-
assert rusti::pref_align_of::<u64>() == 8u;
34-
assert rusti::min_align_of::<u64>() == 8u;
31+
pub fn main() {
32+
assert ::rusti::pref_align_of::<u64>() == 8u;
33+
assert ::rusti::min_align_of::<u64>() == 8u;
3534
}
3635
}
3736

3837
#[cfg(target_os = "win32")]
3938
mod m {
40-
#[legacy_exports];
4139
#[cfg(target_arch = "x86")]
42-
fn main() {
43-
assert rusti::pref_align_of::<u64>() == 8u;
44-
assert rusti::min_align_of::<u64>() == 8u;
40+
pub fn main() {
41+
assert ::rusti::pref_align_of::<u64>() == 8u;
42+
assert ::rusti::min_align_of::<u64>() == 8u;
4543
}
4644
}

branches/incoming/src/test/run-pass/issue-2214.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
// option. This file may not be copied, modified, or distributed
1111
// except according to those terms.
1212

13-
use libc::{c_double, c_int};
14-
use f64::*;
13+
use core::cast;
14+
use core::libc::{c_double, c_int};
15+
use core::f64::*;
1516

1617
fn to_c_int(v: &mut int) -> &mut c_int unsafe {
1718
cast::reinterpret_cast(&v)
@@ -24,13 +25,12 @@ fn lgamma(n: c_double, value: &mut int) -> c_double {
2425
#[link_name = "m"]
2526
#[abi = "cdecl"]
2627
extern mod m {
27-
#[legacy_exports];
2828
#[cfg(unix)]
29-
#[link_name="lgamma_r"] fn lgamma(n: c_double, sign: &mut c_int)
29+
#[link_name="lgamma_r"] pub fn lgamma(n: c_double, sign: &mut c_int)
3030
-> c_double;
3131
#[cfg(windows)]
32-
#[link_name="__lgamma_r"] fn lgamma(n: c_double,
33-
sign: &mut c_int) -> c_double;
32+
#[link_name="__lgamma_r"] pub fn lgamma(n: c_double,
33+
sign: &mut c_int) -> c_double;
3434

3535
}
3636

0 commit comments

Comments
 (0)