Skip to content

Commit 2e2df5c

Browse files
committed
---
yaml --- r: 20756 b: refs/heads/snap-stage3 c: 439afaa h: refs/heads/master v: v3
1 parent c97c152 commit 2e2df5c

File tree

112 files changed

+195
-189
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+195
-189
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: e430a699f2c60890d9b86069fd0c68a70ece7120
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: c2f49c46ae0b07aae8ae558d5a5e71ed85aeff23
4+
refs/heads/snap-stage3: 439afaa329751b3dfd6735862cd2645705598909
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/fuzzer/cycles.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ type pointy = {
3636
mut n : ~[mut maybe_pointy],
3737
mut o : {x : int, y : maybe_pointy}
3838
};
39-
// To add: objects; ifaces; anything type-parameterized?
39+
// To add: objects; traits; anything type-parameterized?
4040

4141
fn empty_pointy() -> @pointy {
4242
ret @{

branches/snap-stage3/src/libcore/float.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ fn test_to_str_inf() {
525525
}
526526

527527
#[test]
528-
fn test_ifaces() {
528+
fn test_traits() {
529529
fn test<U:num::num>(ten: U) {
530530
assert (ten.to_int() == 10);
531531

branches/snap-stage3/src/libcore/future.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ fn test_from_fn() {
158158
}
159159

160160
#[test]
161-
fn test_iface_get() {
161+
fn test_interface_get() {
162162
let f = from_value(~"fail");
163163
assert f.get() == ~"fail";
164164
}
@@ -170,7 +170,7 @@ fn test_with() {
170170
}
171171

172172
#[test]
173-
fn test_iface_with() {
173+
fn test_interface_with() {
174174
let f = from_value(~"kale");
175175
assert f.with(|v| v) == ~"kale";
176176
}

branches/snap-stage3/src/libcore/hash.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ pure fn hash_bytes_keyed(buf: &[const u8], k0: u64, k1: u64) -> u64 {
7979
}
8080

8181

82-
iface streaming {
82+
trait streaming {
8383
fn input(~[u8]);
8484
fn input_str(~str);
8585
fn result() -> ~[u8];

branches/snap-stage3/src/libcore/int-template.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ fn test_to_str() {
230230
}
231231

232232
#[test]
233-
fn test_ifaces() {
233+
fn test_interfaces() {
234234
fn test<U:num::num>(ten: U) {
235235
assert (ten.to_int() == 10);
236236

branches/snap-stage3/src/libcore/io.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ extern mod rustrt {
2727
enum seek_style { seek_set, seek_end, seek_cur, }
2828

2929

30-
// The raw underlying reader iface. All readers must implement this.
31-
iface reader {
30+
// The raw underlying reader trait. All readers must implement this.
31+
trait reader {
3232
// FIXME (#2004): Seekable really should be orthogonal.
3333

3434
// FIXME (#2982): This should probably return an error.
@@ -250,7 +250,7 @@ fn FILE_reader(f: *libc::FILE, cleanup: bool) -> reader {
250250
}
251251
}
252252

253-
// FIXME (#2004): this should either be an iface-less impl, a set of
253+
// FIXME (#2004): this should either be an trait-less impl, a set of
254254
// top-level functions that take a reader, or a set of default methods on
255255
// reader (which can then be called reader)
256256

@@ -335,7 +335,7 @@ enum writer_type { screen, file }
335335

336336
// FIXME (#2004): Seekable really should be orthogonal.
337337
// FIXME (#2004): eventually u64
338-
iface writer {
338+
trait writer {
339339
fn write(v: &[const u8]);
340340
fn seek(int, seek_style);
341341
fn tell() -> uint;
@@ -781,7 +781,7 @@ mod fsync {
781781
}
782782

783783
// Type of objects that may want to fsync
784-
iface t { fn fsync(l: level) -> int; }
784+
trait t { fn fsync(l: level) -> int; }
785785

786786
// Call o.fsync after executing blk
787787
fn obj_sync(&&o: t, opt_level: option<level>, blk: fn(&&res<t>)) {

branches/snap-stage3/src/libcore/iter.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
iface base_iter<A> {
1+
trait base_iter<A> {
22
fn each(blk: fn(A) -> bool);
33
fn size_hint() -> option<uint>;
44
}
@@ -13,10 +13,10 @@ trait extended_iter<A> {
1313
fn position(f: fn(A) -> bool) -> option<uint>;
1414
}
1515

16-
iface times {
16+
trait times {
1717
fn times(it: fn() -> bool);
1818
}
19-
iface timesi{
19+
trait timesi{
2020
fn timesi(it: fn(uint) -> bool);
2121
}
2222

branches/snap-stage3/src/libcore/num.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
trait num {
44
// FIXME: Cross-crate overloading doesn't work yet. (#2615)
5-
// FIXME: Interface inheritance. (#2616)
5+
// FIXME: Trait composition. (#2616)
66
pure fn add(&&other: self) -> self;
77
pure fn sub(&&other: self) -> self;
88
pure fn mul(&&other: self) -> self;
@@ -12,6 +12,6 @@ trait num {
1212

1313
pure fn to_int() -> int;
1414
pure fn from_int(n: int) -> self; // FIXME (#2376) Static functions.
15-
// n.b. #2376 is for classes, not ifaces, but it could be generalized...
15+
// n.b. #2376 is for classes, not traits, but it could be generalized...
1616
}
1717

branches/snap-stage3/src/libcore/rand.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extern mod rustrt {
1515
}
1616

1717
/// A random number generator
18-
iface rng {
18+
trait rng {
1919
/// Return the next random integer
2020
fn next() -> u32;
2121
}

branches/snap-stage3/src/libcore/run.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ extern mod rustrt {
1919
}
2020

2121
/// A value representing a child process
22-
iface program {
22+
trait program {
2323
/// Returns the process id of the program
2424
fn get_id() -> pid_t;
2525

branches/snap-stage3/src/libcore/task.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,7 @@ fn spawn_raw(opts: task_opts, +f: fn~()) {
955955
*/
956956
type local_data_key<T: owned> = fn@(+@T);
957957

958-
iface local_data { }
958+
trait local_data { }
959959
impl<T: owned> of local_data for @T { }
960960

961961
// We use dvec because it's the best data structure in core. If TLS is used

branches/snap-stage3/src/libcore/to_bytes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
iface to_bytes {
1+
trait to_bytes {
22
fn to_bytes() -> ~[u8];
33
}
44

branches/snap-stage3/src/libcore/to_str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
iface to_str { fn to_str() -> ~str; }
1+
trait to_str { fn to_str() -> ~str; }
22

33
impl of to_str for int {
44
fn to_str() -> ~str { int::str(self) }

branches/snap-stage3/src/libstd/base64.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import io::{reader, reader_util};
22

3-
iface to_base64 {
3+
trait to_base64 {
44
fn to_base64() -> ~str;
55
}
66

@@ -58,7 +58,7 @@ impl of to_base64 for ~str {
5858
}
5959
}
6060

61-
iface from_base64 {
61+
trait from_base64 {
6262
fn from_base64() -> ~[u8];
6363
}
6464

branches/snap-stage3/src/libstd/deque.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import option::{some, none};
44
import dvec::{dvec, extensions};
55

6-
iface t<T> {
6+
trait t<T> {
77
fn size() -> uint;
88
fn add_front(T);
99
fn add_back(T);

branches/snap-stage3/src/libstd/json.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ fn eq(value0: json, value1: json) -> bool {
510510
}
511511
}
512512

513-
iface to_json { fn to_json() -> json; }
513+
trait to_json { fn to_json() -> json; }
514514

515515
impl of to_json for json {
516516
fn to_json() -> json { self }

branches/snap-stage3/src/libstd/map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type set<K> = hashmap<K, ()>;
2424

2525
type hashmap<K, V> = chained::t<K, V>;
2626

27-
iface map<K, V: copy> {
27+
trait map<K, V: copy> {
2828
/// Return the number of elements in the map
2929
fn size() -> uint;
3030

branches/snap-stage3/src/libstd/net_tcp.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class tcp_socket {
5454
* A buffered wrapper for `net::tcp::tcp_socket`
5555
*
5656
* It is created with a call to `net::tcp::socket_buf()` and has impls that
57-
* satisfy both the `io::reader` and `io::writer` ifaces.
57+
* satisfy both the `io::reader` and `io::writer` traits.
5858
*/
5959
class tcp_socket_buf {
6060
let data: @tcp_buffered_socket_data;
@@ -764,7 +764,7 @@ impl tcp_socket for tcp_socket {
764764
}
765765
}
766766

767-
/// Implementation of `io::reader` iface for a buffered `net::tcp::tcp_socket`
767+
/// Implementation of `io::reader` trait for a buffered `net::tcp::tcp_socket`
768768
impl tcp_socket_buf of io::reader for @tcp_socket_buf {
769769
fn read(buf: &[mut u8], len: uint) -> uint {
770770
// Loop until our buffer has enough data in it for us to read from.
@@ -817,7 +817,7 @@ impl tcp_socket_buf of io::reader for @tcp_socket_buf {
817817
}
818818
}
819819

820-
/// Implementation of `io::reader` iface for a buffered `net::tcp::tcp_socket`
820+
/// Implementation of `io::reader` trait for a buffered `net::tcp::tcp_socket`
821821
impl tcp_socket_buf of io::writer for @tcp_socket_buf {
822822
fn write(data: &[const u8]) unsafe {
823823
let socket_data_ptr =
@@ -1083,11 +1083,11 @@ enum tcp_read_result {
10831083
tcp_read_err(tcp_err_data)
10841084
}
10851085

1086-
iface to_tcp_err_iface {
1086+
trait to_tcp_err {
10871087
fn to_tcp_err() -> tcp_err_data;
10881088
}
10891089

1090-
impl of to_tcp_err_iface for uv::ll::uv_err_data {
1090+
impl of to_tcp_err for uv::ll::uv_err_data {
10911091
fn to_tcp_err() -> tcp_err_data {
10921092
{ err_name: self.err_name, err_msg: self.err_msg }
10931093
}

branches/snap-stage3/src/libstd/serialization.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use core;
66
Core serialization interfaces.
77
*/
88

9-
iface serializer {
9+
trait serializer {
1010
// Primitive types:
1111
fn emit_nil();
1212
fn emit_uint(v: uint);
@@ -39,7 +39,7 @@ iface serializer {
3939
fn emit_tup_elt(idx: uint, f: fn());
4040
}
4141

42-
iface deserializer {
42+
trait deserializer {
4343
// Primitive types:
4444
fn read_nil() -> ();
4545

branches/snap-stage3/src/libstd/sha1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
export sha1;
2121

2222
/// The SHA-1 interface
23-
iface sha1 {
23+
trait sha1 {
2424
/// Provide message input as bytes
2525
fn input(~[u8]);
2626
/// Provide message input as string

branches/snap-stage3/src/libsyntax/diagnostic.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type emitter = fn@(cmsp: option<(codemap::codemap, span)>,
1313
msg: ~str, lvl: level);
1414

1515

16-
iface span_handler {
16+
trait span_handler {
1717
fn span_fatal(sp: span, msg: ~str) -> !;
1818
fn span_err(sp: span, msg: ~str);
1919
fn span_warn(sp: span, msg: ~str);
@@ -23,7 +23,7 @@ iface span_handler {
2323
fn handler() -> handler;
2424
}
2525

26-
iface handler {
26+
trait handler {
2727
fn fatal(msg: ~str) -> !;
2828
fn err(msg: ~str);
2929
fn bump_err_count();

branches/snap-stage3/src/libsyntax/ext/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ fn syntax_expander_table() -> hashmap<~str, syntax_extension> {
114114
// One of these is made during expansion and incrementally updated as we go;
115115
// when a macro expansion occurs, the resulting nodes have the backtrace()
116116
// -> expn_info of their expansion context stored into their span.
117-
iface ext_ctxt {
117+
trait ext_ctxt {
118118
fn codemap() -> codemap;
119119
fn parse_sess() -> parse::parse_sess;
120120
fn cfg() -> ast::crate_cfg;

branches/snap-stage3/src/libsyntax/ext/pipes/pipec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ impl compile of gen_init for protocol {
383383
}
384384
}
385385
386-
iface to_source {
386+
trait to_source {
387387
// Takes a thing and generates a string containing rust code for it.
388388
fn to_source() -> ~str;
389389
}

branches/snap-stage3/src/libsyntax/ext/qquote.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ enum fragment {
2222
from_ty(@ast::ty)
2323
}
2424

25-
iface qq_helper {
25+
trait qq_helper {
2626
fn span() -> span;
2727
fn visit(aq_ctxt, vt<aq_ctxt>);
2828
fn extract_mac() -> option<ast::mac_>;

branches/snap-stage3/src/libsyntax/fold.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export fold_ty_params;
1818
export fold_fn_decl;
1919
export extensions;
2020

21-
iface ast_fold {
21+
trait ast_fold {
2222
fn fold_crate(crate) -> crate;
2323
fn fold_crate_directive(&&@crate_directive) -> @crate_directive;
2424
fn fold_view_item(&&@view_item) -> @view_item;

branches/snap-stage3/src/libsyntax/parse/lexer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export tt_reader, new_tt_reader;
99
export nextch, is_eof, bump, get_str_from, new_low_level_string_reader;
1010
export string_reader_as_reader, tt_reader_as_reader;
1111

12-
iface reader {
12+
trait reader {
1313
fn is_eof() -> bool;
1414
fn next_token() -> {tok: token::token, sp: span};
1515
fn fatal(~str) -> !;

branches/snap-stage3/src/libsyntax/parse/parser.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2702,6 +2702,7 @@ class parser {
27022702
} else if self.eat_keyword(~"enum") {
27032703
self.parse_item_enum(vis)
27042704
} else if self.eat_keyword(~"iface") {
2705+
self.warn(~"`iface` is deprecated; use `trait`");
27052706
self.parse_item_trait()
27062707
} else if self.eat_keyword(~"trait") {
27072708
self.parse_item_trait()

branches/snap-stage3/src/libsyntax/print/pprust.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ fn print_item(s: ps, &&item: @ast::item) {
588588
bclose(s, item.span);
589589
}
590590
ast::item_trait(tps, methods) {
591-
head(s, ~"iface");
591+
head(s, ~"trait");
592592
word(s.s, *item.ident);
593593
print_type_params(s, tps);
594594
word(s.s, ~" ");

branches/snap-stage3/src/libsyntax/util/interner.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fn mk<T: const copy>(hasher: hashfn<T>, eqer: eqfn<T>) -> interner<T> {
1919
}
2020

2121
/* when traits can extend traits, we should extend index<uint,T> to get [] */
22-
iface interner<T: const copy> {
22+
trait interner<T: const copy> {
2323
fn intern(T) -> uint;
2424
pure fn get(uint) -> T;
2525
fn len() -> uint;

branches/snap-stage3/src/rt/rust_box_annihilator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class annihilator : public shape::data<annihilator,shape::ptr> {
120120
return;
121121
}
122122

123-
void walk_iface2() {
123+
void walk_trait2() {
124124
walk_box2();
125125
}
126126

0 commit comments

Comments
 (0)