diff options
| author | Lindsey Kuper <lindsey@rockstargirl.org> | 2012-07-31 10:27:51 -0700 |
|---|---|---|
| committer | Lindsey Kuper <lindsey@rockstargirl.org> | 2012-07-31 11:52:16 -0700 |
| commit | 439afaa329751b3dfd6735862cd2645705598909 (patch) | |
| tree | 4a3c51b47d6ee3c2e057677efdcf29c60e0d9d95 /src/libcore | |
| parent | c2f49c46ae0b07aae8ae558d5a5e71ed85aeff23 (diff) | |
| download | rust-439afaa329751b3dfd6735862cd2645705598909.tar.gz rust-439afaa329751b3dfd6735862cd2645705598909.zip | |
Change remaining "iface" occurrences to "trait"; deprecate "iface"
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/float.rs | 2 | ||||
| -rw-r--r-- | src/libcore/future.rs | 4 | ||||
| -rw-r--r-- | src/libcore/hash.rs | 2 | ||||
| -rw-r--r-- | src/libcore/int-template.rs | 2 | ||||
| -rw-r--r-- | src/libcore/io.rs | 10 | ||||
| -rw-r--r-- | src/libcore/iter.rs | 6 | ||||
| -rw-r--r-- | src/libcore/num.rs | 4 | ||||
| -rw-r--r-- | src/libcore/rand.rs | 2 | ||||
| -rw-r--r-- | src/libcore/run.rs | 2 | ||||
| -rw-r--r-- | src/libcore/task.rs | 2 | ||||
| -rw-r--r-- | src/libcore/to_bytes.rs | 2 | ||||
| -rw-r--r-- | src/libcore/to_str.rs | 2 |
12 files changed, 20 insertions, 20 deletions
diff --git a/src/libcore/float.rs b/src/libcore/float.rs index 8b8cc4664dc..d2efba51131 100644 --- a/src/libcore/float.rs +++ b/src/libcore/float.rs @@ -525,7 +525,7 @@ fn test_to_str_inf() { } #[test] -fn test_ifaces() { +fn test_traits() { fn test<U:num::num>(ten: U) { assert (ten.to_int() == 10); diff --git a/src/libcore/future.rs b/src/libcore/future.rs index 83dc6b7178b..7dfafd499a4 100644 --- a/src/libcore/future.rs +++ b/src/libcore/future.rs @@ -158,7 +158,7 @@ fn test_from_fn() { } #[test] -fn test_iface_get() { +fn test_interface_get() { let f = from_value(~"fail"); assert f.get() == ~"fail"; } @@ -170,7 +170,7 @@ fn test_with() { } #[test] -fn test_iface_with() { +fn test_interface_with() { let f = from_value(~"kale"); assert f.with(|v| v) == ~"kale"; } diff --git a/src/libcore/hash.rs b/src/libcore/hash.rs index 1445c43df79..71b5660c672 100644 --- a/src/libcore/hash.rs +++ b/src/libcore/hash.rs @@ -79,7 +79,7 @@ pure fn hash_bytes_keyed(buf: &[const u8], k0: u64, k1: u64) -> u64 { } -iface streaming { +trait streaming { fn input(~[u8]); fn input_str(~str); fn result() -> ~[u8]; diff --git a/src/libcore/int-template.rs b/src/libcore/int-template.rs index acde4ad4265..b58e00d2e9c 100644 --- a/src/libcore/int-template.rs +++ b/src/libcore/int-template.rs @@ -230,7 +230,7 @@ fn test_to_str() { } #[test] -fn test_ifaces() { +fn test_interfaces() { fn test<U:num::num>(ten: U) { assert (ten.to_int() == 10); diff --git a/src/libcore/io.rs b/src/libcore/io.rs index e83842232e6..510be3f89b9 100644 --- a/src/libcore/io.rs +++ b/src/libcore/io.rs @@ -27,8 +27,8 @@ extern mod rustrt { enum seek_style { seek_set, seek_end, seek_cur, } -// The raw underlying reader iface. All readers must implement this. -iface reader { +// The raw underlying reader trait. All readers must implement this. +trait reader { // FIXME (#2004): Seekable really should be orthogonal. // FIXME (#2982): This should probably return an error. @@ -250,7 +250,7 @@ fn FILE_reader(f: *libc::FILE, cleanup: bool) -> reader { } } -// FIXME (#2004): this should either be an iface-less impl, a set of +// FIXME (#2004): this should either be an trait-less impl, a set of // top-level functions that take a reader, or a set of default methods on // reader (which can then be called reader) @@ -335,7 +335,7 @@ enum writer_type { screen, file } // FIXME (#2004): Seekable really should be orthogonal. // FIXME (#2004): eventually u64 -iface writer { +trait writer { fn write(v: &[const u8]); fn seek(int, seek_style); fn tell() -> uint; @@ -781,7 +781,7 @@ mod fsync { } // Type of objects that may want to fsync - iface t { fn fsync(l: level) -> int; } + trait t { fn fsync(l: level) -> int; } // Call o.fsync after executing blk fn obj_sync(&&o: t, opt_level: option<level>, blk: fn(&&res<t>)) { diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs index e54fbabb0aa..092f69cd47a 100644 --- a/src/libcore/iter.rs +++ b/src/libcore/iter.rs @@ -1,4 +1,4 @@ -iface base_iter<A> { +trait base_iter<A> { fn each(blk: fn(A) -> bool); fn size_hint() -> option<uint>; } @@ -13,10 +13,10 @@ trait extended_iter<A> { fn position(f: fn(A) -> bool) -> option<uint>; } -iface times { +trait times { fn times(it: fn() -> bool); } -iface timesi{ +trait timesi{ fn timesi(it: fn(uint) -> bool); } diff --git a/src/libcore/num.rs b/src/libcore/num.rs index 03868527655..e8a36f38842 100644 --- a/src/libcore/num.rs +++ b/src/libcore/num.rs @@ -2,7 +2,7 @@ trait num { // FIXME: Cross-crate overloading doesn't work yet. (#2615) - // FIXME: Interface inheritance. (#2616) + // FIXME: Trait composition. (#2616) pure fn add(&&other: self) -> self; pure fn sub(&&other: self) -> self; pure fn mul(&&other: self) -> self; @@ -12,6 +12,6 @@ trait num { pure fn to_int() -> int; pure fn from_int(n: int) -> self; // FIXME (#2376) Static functions. - // n.b. #2376 is for classes, not ifaces, but it could be generalized... + // n.b. #2376 is for classes, not traits, but it could be generalized... } diff --git a/src/libcore/rand.rs b/src/libcore/rand.rs index 85e5b43a998..cda205a98b5 100644 --- a/src/libcore/rand.rs +++ b/src/libcore/rand.rs @@ -15,7 +15,7 @@ extern mod rustrt { } /// A random number generator -iface rng { +trait rng { /// Return the next random integer fn next() -> u32; } diff --git a/src/libcore/run.rs b/src/libcore/run.rs index f2e3981fd87..09dbf2c37c3 100644 --- a/src/libcore/run.rs +++ b/src/libcore/run.rs @@ -19,7 +19,7 @@ extern mod rustrt { } /// A value representing a child process -iface program { +trait program { /// Returns the process id of the program fn get_id() -> pid_t; diff --git a/src/libcore/task.rs b/src/libcore/task.rs index 9b86a100289..6b356819340 100644 --- a/src/libcore/task.rs +++ b/src/libcore/task.rs @@ -955,7 +955,7 @@ fn spawn_raw(opts: task_opts, +f: fn~()) { */ type local_data_key<T: owned> = fn@(+@T); -iface local_data { } +trait local_data { } impl<T: owned> of local_data for @T { } // We use dvec because it's the best data structure in core. If TLS is used diff --git a/src/libcore/to_bytes.rs b/src/libcore/to_bytes.rs index 0daeff81975..3e463653a43 100644 --- a/src/libcore/to_bytes.rs +++ b/src/libcore/to_bytes.rs @@ -1,4 +1,4 @@ -iface to_bytes { +trait to_bytes { fn to_bytes() -> ~[u8]; } diff --git a/src/libcore/to_str.rs b/src/libcore/to_str.rs index 138a408435a..76b0694d3d8 100644 --- a/src/libcore/to_str.rs +++ b/src/libcore/to_str.rs @@ -1,4 +1,4 @@ -iface to_str { fn to_str() -> ~str; } +trait to_str { fn to_str() -> ~str; } impl of to_str for int { fn to_str() -> ~str { int::str(self) } |
