Skip to content

Commit 6e75768

Browse files
committed
---
yaml --- r: 24285 b: refs/heads/master c: 3654287 h: refs/heads/master i: 24283: b9ad779 v: v3
1 parent 9a861a1 commit 6e75768

File tree

7 files changed

+19
-26
lines changed

7 files changed

+19
-26
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: fec96b2ae0f387488f718390eee4c67a043d9a9b
2+
refs/heads/master: 365428782660b01a8702b589214ca20d35efd23d
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be

trunk/src/libcore/core.rc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ mod hash;
188188
mod either;
189189
#[legacy_exports]
190190
mod iter;
191-
#[legacy_exports]
192191
mod logging;
193192
#[legacy_exports]
194193
mod option;
@@ -201,13 +200,9 @@ mod option_iter {
201200
}
202201
#[legacy_exports]
203202
mod result;
204-
#[legacy_exports]
205203
mod to_str;
206-
#[legacy_exports]
207204
mod to_bytes;
208-
#[legacy_exports]
209205
mod from_str;
210-
#[legacy_exports]
211206
mod util;
212207

213208
// Data structure modules

trunk/src/libcore/from_str.rs

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

77
use option::Option;
88

9-
trait FromStr {
9+
pub trait FromStr {
1010
static fn from_str(s: &str) -> Option<self>;
1111
}
1212

trunk/src/libcore/logging.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use cast::transmute;
88

99
#[nolink]
1010
extern mod rustrt {
11-
#[legacy_exports];
1211
fn rust_log_console_on();
1312
fn rust_log_console_off();
1413
fn rust_log_str(level: u32, string: *libc::c_char, size: libc::size_t);

trunk/src/libcore/to_bytes.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The `ToBytes` and `IterBytes` traits
1010

1111
use io::Writer;
1212

13-
type Cb = fn(buf: &[const u8]) -> bool;
13+
pub type Cb = fn(buf: &[const u8]) -> bool;
1414

1515
/**
1616
* A trait to implement in order to make a type hashable;
@@ -19,7 +19,7 @@ type Cb = fn(buf: &[const u8]) -> bool;
1919
* modified when default methods and trait inheritence are
2020
* completed.
2121
*/
22-
trait IterBytes {
22+
pub trait IterBytes {
2323
/**
2424
* Call the provided callback `f` one or more times with
2525
* byte-slices that should be used when computing a hash
@@ -211,15 +211,15 @@ impl<A: IterBytes> @[A]: IterBytes {
211211
}
212212
}
213213

214-
pure fn iter_bytes_2<A: IterBytes, B: IterBytes>(a: &A, b: &B,
214+
pub pure fn iter_bytes_2<A: IterBytes, B: IterBytes>(a: &A, b: &B,
215215
lsb0: bool, z: Cb) {
216216
let mut flag = true;
217217
a.iter_bytes(lsb0, |bytes| {flag = z(bytes); flag});
218218
if !flag { return; }
219219
b.iter_bytes(lsb0, |bytes| {flag = z(bytes); flag});
220220
}
221221

222-
pure fn iter_bytes_3<A: IterBytes,
222+
pub pure fn iter_bytes_3<A: IterBytes,
223223
B: IterBytes,
224224
C: IterBytes>(a: &A, b: &B, c: &C,
225225
lsb0: bool, z: Cb) {
@@ -231,7 +231,7 @@ pure fn iter_bytes_3<A: IterBytes,
231231
c.iter_bytes(lsb0, |bytes| {flag = z(bytes); flag});
232232
}
233233

234-
pure fn iter_bytes_4<A: IterBytes,
234+
pub pure fn iter_bytes_4<A: IterBytes,
235235
B: IterBytes,
236236
C: IterBytes,
237237
D: IterBytes>(a: &A, b: &B, c: &C,
@@ -247,7 +247,7 @@ pure fn iter_bytes_4<A: IterBytes,
247247
d.iter_bytes(lsb0, |bytes| {flag = z(bytes); flag});
248248
}
249249

250-
pure fn iter_bytes_5<A: IterBytes,
250+
pub pure fn iter_bytes_5<A: IterBytes,
251251
B: IterBytes,
252252
C: IterBytes,
253253
D: IterBytes,
@@ -266,7 +266,7 @@ pure fn iter_bytes_5<A: IterBytes,
266266
e.iter_bytes(lsb0, |bytes| {flag = z(bytes); flag});
267267
}
268268

269-
pure fn iter_bytes_6<A: IterBytes,
269+
pub pure fn iter_bytes_6<A: IterBytes,
270270
B: IterBytes,
271271
C: IterBytes,
272272
D: IterBytes,
@@ -288,7 +288,7 @@ pure fn iter_bytes_6<A: IterBytes,
288288
f.iter_bytes(lsb0, |bytes| {flag = z(bytes); flag});
289289
}
290290

291-
pure fn iter_bytes_7<A: IterBytes,
291+
pub pure fn iter_bytes_7<A: IterBytes,
292292
B: IterBytes,
293293
C: IterBytes,
294294
D: IterBytes,

trunk/src/libcore/to_str.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The `ToStr` trait for converting to strings
88
#[forbid(deprecated_mode)];
99
#[forbid(deprecated_pattern)];
1010

11-
trait ToStr { fn to_str() -> ~str; }
11+
pub trait ToStr { fn to_str() -> ~str; }
1212

1313
impl int: ToStr {
1414
fn to_str() -> ~str { int::str(self) }
@@ -101,7 +101,6 @@ impl<A: ToStr> ~A: ToStr {
101101
#[cfg(test)]
102102
#[allow(non_implicitly_copyable_typarams)]
103103
mod tests {
104-
#[legacy_exports];
105104
#[test]
106105
fn test_simple_types() {
107106
assert 1.to_str() == ~"1";

trunk/src/libcore/util.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ use cmp::Eq;
1212

1313
/// The identity function.
1414
#[inline(always)]
15-
pure fn id<T>(+x: T) -> T { move x }
15+
pub pure fn id<T>(+x: T) -> T { move x }
1616

1717
/// Ignores a value.
1818
#[inline(always)]
19-
pure fn ignore<T>(+_x: T) { }
19+
pub pure fn ignore<T>(+_x: T) { }
2020

2121
/// Sets `*ptr` to `new_value`, invokes `op()`, and then restores the
2222
/// original value of `*ptr`.
2323
#[inline(always)]
24-
fn with<T: Copy, R>(
24+
pub fn with<T: Copy, R>(
2525
ptr: &mut T,
2626
+new_value: T,
2727
op: &fn() -> R) -> R
@@ -41,7 +41,7 @@ fn with<T: Copy, R>(
4141
* deinitialising or copying either one.
4242
*/
4343
#[inline(always)]
44-
fn swap<T>(x: &mut T, y: &mut T) {
44+
pub fn swap<T>(x: &mut T, y: &mut T) {
4545
*x <-> *y;
4646
}
4747

@@ -50,19 +50,19 @@ fn swap<T>(x: &mut T, y: &mut T) {
5050
* value, without deinitialising or copying either one.
5151
*/
5252
#[inline(always)]
53-
fn replace<T>(dest: &mut T, +src: T) -> T {
53+
pub fn replace<T>(dest: &mut T, +src: T) -> T {
5454
let mut tmp <- src;
5555
swap(dest, &mut tmp);
5656
move tmp
5757
}
5858

5959
/// A non-copyable dummy type.
60-
struct NonCopyable {
60+
pub struct NonCopyable {
6161
i: (),
6262
drop { }
6363
}
6464

65-
fn NonCopyable() -> NonCopyable { NonCopyable { i: () } }
65+
pub fn NonCopyable() -> NonCopyable { NonCopyable { i: () } }
6666

6767
/**
6868
A utility function for indicating unreachable code. It will fail if
@@ -88,7 +88,7 @@ fn choose_weighted_item(v: &[Item]) -> Item {
8888
~~~
8989
9090
*/
91-
fn unreachable() -> ! {
91+
pub fn unreachable() -> ! {
9292
fail ~"internal error: entered unreachable code";
9393
}
9494

0 commit comments

Comments
 (0)