Skip to content

Commit 039bdc5

Browse files
ericktgraydon
authored andcommitted
---
yaml --- r: 4736 b: refs/heads/master c: e4a0f99 h: refs/heads/master v: v3
1 parent e82535e commit 039bdc5

Some content is hidden

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

52 files changed

+569
-569
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: f764f9a8cf52e686ba6e54b594e6bbbdd5bc7b32
2+
refs/heads/master: e4a0f997fb01b9cbb650532fea1278159faff064

trunk/src/comp/README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ The 3 central data structures:
3333
structure:
3434

3535
- Many -- though not all -- nodes within this data structure are
36-
wrapped in the type spanned[T], meaning that the front-end has
36+
wrapped in the type spanned<T>, meaning that the front-end has
3737
marked the input coordinates of that node. The member .node is
3838
the data itself, the member .span is the input location (file,
3939
line, column; both low and high).

trunk/src/comp/back/link.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,14 +285,14 @@ fn build_link_meta(sess: &session::session, c: &ast::crate, output: &str,
285285
sha: sha1) -> link_meta {
286286

287287
type provided_metas =
288-
{name: option::t[str],
289-
vers: option::t[str],
288+
{name: option::t<str>,
289+
vers: option::t<str>,
290290
cmh_items: [@ast::meta_item]};
291291

292292
fn provided_link_metas(sess: &session::session, c: &ast::crate) ->
293293
provided_metas {
294-
let name: option::t[str] = none;
295-
let vers: option::t[str] = none;
294+
let name: option::t<str> = none;
295+
let vers: option::t<str> = none;
296296
let cmh_items: [@ast::meta_item] = ~[];
297297
let linkage_metas = attr::find_linkage_metas(c.node.attrs);
298298
attr::require_unique_names(sess, linkage_metas);

trunk/src/comp/driver/rustc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ fn opts() -> [getopts::opt] {
437437
optflag("lib"), optflag("static"), optflag("gc")];
438438
}
439439

440-
fn main(args: vec[str]) {
440+
fn main(args: vec<str>) {
441441
let args_ivec = vec::from_vec(args);
442442
let binary = vec::shift(args_ivec);
443443
let binary_dir = fs::dirname(binary);

trunk/src/comp/driver/session.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ obj session(targ_cfg: @config,
5454
parse_sess: parse_sess,
5555

5656
// For a library crate, this is always none
57-
mutable main_fn: option::t[node_id],
57+
mutable main_fn: option::t<node_id>,
5858
mutable err_count: uint) {
5959
fn get_targ_cfg() -> @config { ret targ_cfg; }
6060
fn get_opts() -> @options { ret opts; }
@@ -111,7 +111,7 @@ obj session(targ_cfg: @config,
111111
ret codemap::span_to_str(sp, self.get_codemap());
112112
}
113113
fn set_main_id(d: node_id) { main_fn = some(d); }
114-
fn get_main_id() -> option::t[node_id] { main_fn }
114+
fn get_main_id() -> option::t<node_id> { main_fn }
115115
}
116116
// Local Variables:
117117
// fill-column: 78;

trunk/src/comp/front/attr.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ fn find_attrs_by_name(attrs: &[ast::attribute], name: ast::ident) ->
4545
[ast::attribute] {
4646
let filter =
4747
bind fn (a: &ast::attribute, name: ast::ident) ->
48-
option::t[ast::attribute] {
48+
option::t<ast::attribute> {
4949
if get_attr_name(a) == name {
5050
option::some(a)
5151
} else { option::none }
@@ -61,7 +61,7 @@ fn find_meta_items_by_name(metas: &[@ast::meta_item], name: ast::ident) ->
6161
[@ast::meta_item] {
6262
let filter =
6363
bind fn (m: &@ast::meta_item, name: ast::ident) ->
64-
option::t[@ast::meta_item] {
64+
option::t<@ast::meta_item> {
6565
if get_meta_item_name(m) == name {
6666
option::some(m)
6767
} else { option::none }
@@ -79,7 +79,7 @@ fn get_meta_item_name(meta: &@ast::meta_item) -> ast::ident {
7979

8080
// Gets the string value if the meta_item is a meta_name_value variant
8181
// containing a string, otherwise none
82-
fn get_meta_item_value_str(meta: &@ast::meta_item) -> option::t[str] {
82+
fn get_meta_item_value_str(meta: &@ast::meta_item) -> option::t<str> {
8383
alt meta.node {
8484
ast::meta_name_value(_, v) {
8585
alt v.node {
@@ -167,7 +167,7 @@ fn remove_meta_items_by_name(items: &[@ast::meta_item], name: str) ->
167167

168168
let filter =
169169
bind fn (item: &@ast::meta_item, name: str) ->
170-
option::t[@ast::meta_item] {
170+
option::t<@ast::meta_item> {
171171
if get_meta_item_name(item) != name {
172172
option::some(item)
173173
} else { option::none }
@@ -189,7 +189,7 @@ fn require_unique_names(sess: &session::session,
189189
}
190190
}
191191

192-
fn span[T](item: &T) -> ast::spanned[T] {
192+
fn span[T](item: &T) -> ast::spanned<T> {
193193
ret {node: item, span: ast::mk_sp(0u, 0u)};
194194
}
195195

trunk/src/comp/front/config.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fn strip_unconfigured_items(crate: @ast::crate) -> @ast::crate {
2525
}
2626

2727
fn filter_item(cfg: &ast::crate_cfg, item: &@ast::item) ->
28-
option::t[@ast::item] {
28+
option::t<@ast::item> {
2929
if item_in_cfg(cfg, item) { option::some(item) } else { option::none }
3030
}
3131

@@ -38,7 +38,7 @@ fn fold_mod(cfg: &ast::crate_cfg, m: &ast::_mod, fld: fold::ast_fold) ->
3838
}
3939

4040
fn filter_native_item(cfg: &ast::crate_cfg, item: &@ast::native_item) ->
41-
option::t[@ast::native_item] {
41+
option::t<@ast::native_item> {
4242
if native_item_in_cfg(cfg, item) {
4343
option::some(item)
4444
} else { option::none }
@@ -55,7 +55,7 @@ fn fold_native_mod(cfg: &ast::crate_cfg, nm: &ast::native_mod,
5555
}
5656

5757
fn filter_stmt(cfg: &ast::crate_cfg, stmt: &@ast::stmt) ->
58-
option::t[@ast::stmt] {
58+
option::t<@ast::stmt> {
5959
alt stmt.node {
6060
ast::stmt_decl(decl, _) {
6161
alt decl.node {

trunk/src/comp/front/test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ fn fold_mod(cx: &test_ctxt, m: &ast::_mod, fld: fold::ast_fold) -> ast::_mod {
5757
// the one we're going to add. FIXME: This is sloppy. Instead we should
5858
// have some mechanism to indicate to the translation pass which function
5959
// we want to be main.
60-
fn nomain(item: &@ast::item) -> option::t[@ast::item] {
60+
fn nomain(item: &@ast::item) -> option::t<@ast::item> {
6161
alt item.node {
6262
ast::item_fn(f, _) {
6363
if item.ident == "main" {
@@ -167,7 +167,7 @@ fn mk_test_module(cx: &test_ctxt) -> @ast::item {
167167
ret @item;
168168
}
169169

170-
fn nospan[T](t: &T) -> ast::spanned[T] {
170+
fn nospan[T](t: &T) -> ast::spanned<T> {
171171
ret {node: t, span: ast::dummy_sp()};
172172
}
173173

trunk/src/comp/lib/llvm.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1420,8 +1420,8 @@ fn new_builder(llbb: BasicBlockRef) -> builder {
14201420

14211421
/* Memory-managed object interface to type handles. */
14221422

1423-
obj type_names(type_names: std::map::hashmap[TypeRef, str],
1424-
named_types: std::map::hashmap[str, TypeRef]) {
1423+
obj type_names(type_names: std::map::hashmap<TypeRef, str>,
1424+
named_types: std::map::hashmap<str, TypeRef>) {
14251425

14261426
fn associate(s: str, t: TypeRef) {
14271427
assert (!named_types.contains_key(s));
@@ -1446,8 +1446,8 @@ fn mk_type_names() -> type_names {
14461446

14471447
fn eq(a: &TypeRef, b: &TypeRef) -> bool { ret a as uint == b as uint; }
14481448

1449-
let hasher: std::map::hashfn[TypeRef] = hash;
1450-
let eqer: std::map::eqfn[TypeRef] = eq;
1449+
let hasher: std::map::hashfn<TypeRef> = hash;
1450+
let eqer: std::map::eqfn<TypeRef> = eq;
14511451
let tn = std::map::mk_hashmap[TypeRef, str](hasher, eqer);
14521452

14531453
ret type_names(tn, nt);

trunk/src/comp/metadata/creader.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ fn read_crates(sess: session::session, crate: &ast::crate) {
4545

4646
type env =
4747
@{sess: session::session,
48-
crate_cache: @hashmap[str, int],
48+
crate_cache: @hashmap<str, int>,
4949
library_search_paths: [str],
5050
mutable next_crate_num: ast::crate_num};
5151

@@ -118,7 +118,7 @@ fn default_native_lib_naming(sess: session::session, static: bool) ->
118118
fn find_library_crate(sess: &session::session, ident: &ast::ident,
119119
metas: &[@ast::meta_item],
120120
library_search_paths: &[str]) ->
121-
option::t[{ident: str, data: @[u8]}] {
121+
option::t<{ident: str, data: @[u8]}> {
122122

123123
attr::require_unique_names(sess, metas);
124124

@@ -148,7 +148,7 @@ fn find_library_crate(sess: &session::session, ident: &ast::ident,
148148
fn find_library_crate_aux(nn: &{prefix: str, suffix: str}, crate_name: str,
149149
metas: &[@ast::meta_item],
150150
library_search_paths: &[str]) ->
151-
option::t[{ident: str, data: @[u8]}] {
151+
option::t<{ident: str, data: @[u8]}> {
152152
let prefix: str = nn.prefix + crate_name;
153153
// FIXME: we could probably use a 'glob' function in std::fs but it will
154154
// be much easier to write once the unsafe module knows more about FFI
@@ -183,7 +183,7 @@ fn find_library_crate_aux(nn: &{prefix: str, suffix: str}, crate_name: str,
183183
ret none;
184184
}
185185

186-
fn get_metadata_section(filename: str) -> option::t[@[u8]] {
186+
fn get_metadata_section(filename: str) -> option::t<@[u8]> {
187187
let b = str::buf(filename);
188188
let mb = llvm::LLVMRustCreateMemoryBufferWithContentsOfFile(b);
189189
if mb as int == 0 { ret option::none[@[u8]]; }

0 commit comments

Comments
 (0)