diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-03-13 14:39:28 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-03-13 15:14:17 -0700 |
| commit | b968c8e6cd362567bf0047a96d261691dfca43e8 (patch) | |
| tree | 9cec3e42976bef8815df2a5710083d2bb518b651 /src/rustc | |
| parent | a38ccf12547b1bdb37dce3c7edca5b95a898326a (diff) | |
| download | rust-b968c8e6cd362567bf0047a96d261691dfca43e8.tar.gz rust-b968c8e6cd362567bf0047a96d261691dfca43e8.zip | |
Name types after their modules instead of 't'
Diffstat (limited to 'src/rustc')
| -rw-r--r-- | src/rustc/front/attr.rs | 2 | ||||
| -rw-r--r-- | src/rustc/metadata/astencode_gen.rs | 32 | ||||
| -rw-r--r-- | src/rustc/middle/trans/closure.rs | 2 | ||||
| -rw-r--r-- | src/rustc/middle/ty.rs | 4 | ||||
| -rw-r--r-- | src/rustc/middle/typeck.rs | 10 | ||||
| -rw-r--r-- | src/rustc/syntax/ast.rs | 4 | ||||
| -rw-r--r-- | src/rustc/syntax/parse/parser.rs | 4 | ||||
| -rw-r--r-- | src/rustc/util/filesearch.rs | 10 |
8 files changed, 34 insertions, 34 deletions
diff --git a/src/rustc/front/attr.rs b/src/rustc/front/attr.rs index fc9c50a1e00..9bd817fb36a 100644 --- a/src/rustc/front/attr.rs +++ b/src/rustc/front/attr.rs @@ -231,7 +231,7 @@ fn require_unique_names(sess: session, metas: [@ast::meta_item]) { } } -fn native_abi(attrs: [ast::attribute]) -> either::t<str, ast::native_abi> { +fn native_abi(attrs: [ast::attribute]) -> either<str, ast::native_abi> { ret alt attr::get_meta_item_value_str_by_name(attrs, "abi") { option::none { either::right(ast::native_abi_cdecl) diff --git a/src/rustc/metadata/astencode_gen.rs b/src/rustc/metadata/astencode_gen.rs index 7b1c2fdf9d9..9292490ff6b 100644 --- a/src/rustc/metadata/astencode_gen.rs +++ b/src/rustc/metadata/astencode_gen.rs @@ -261,7 +261,7 @@ fn serialize_20<S: std::serialization::serializer>(s: S, v: uint) { /*core::option::t<syntax::codemap::span>*/ fn serialize_26<S: std::serialization::serializer>(s: S, v: - core::option::t<syntax::codemap::span>) { + core::option<syntax::codemap::span>) { s.emit_enum("core::option::t", /*syntax::codemap::span*/ @@ -291,7 +291,7 @@ fn serialize_25<S: std::serialization::serializer>(s: S, v: {name: str, span: - core::option::t<syntax::codemap::span>,}) { + core::option<syntax::codemap::span>,}) { s.emit_rec(/*str*//*core::option::t<syntax::codemap::span>*/ {|| { @@ -311,7 +311,7 @@ fn serialize_24<S: std::serialization::serializer>(s: S, callie: {name: str, span: - core::option::t<syntax::codemap::span>,},}) { + core::option<syntax::codemap::span>,},}) { s.emit_rec(/*syntax::codemap::span*/ /*{name: str,span: core::option::t<syntax::codemap::span>}*/ {|| @@ -1269,7 +1269,7 @@ fn serialize_76<S: std::serialization::serializer>(s: S, /*core::option::t<@syntax::ast::expr>*/ fn serialize_79<S: std::serialization::serializer>(s: S, v: - core::option::t<@syntax::ast::expr>) { + core::option<@syntax::ast::expr>) { s.emit_enum("core::option::t", /*@syntax::ast::expr*/ @@ -1297,7 +1297,7 @@ fn serialize_79<S: std::serialization::serializer>(s: S, /*[core::option::t<@syntax::ast::expr>]*/ fn serialize_80<S: std::serialization::serializer>(s: S, v: - [core::option::t<@syntax::ast::expr>]) { + [core::option<@syntax::ast::expr>]) { s.emit_vec(vec::len(v), /*core::option::t<@syntax::ast::expr>*/ {|| vec::iteri(v, @@ -1712,7 +1712,7 @@ fn serialize_85<S: std::serialization::serializer>(s: S, /*core::option::t<@syntax::ast::pat>*/ fn serialize_112<S: std::serialization::serializer>(s: S, v: - core::option::t<@syntax::ast::pat>) { + core::option<@syntax::ast::pat>) { s.emit_enum("core::option::t", /*@syntax::ast::pat*/ @@ -1973,7 +1973,7 @@ fn serialize_117<S: std::serialization::serializer>(s: S, /*core::option::t<syntax::ast::initializer>*/ fn serialize_116<S: std::serialization::serializer>(s: S, v: - core::option::t<syntax::ast::initializer>) { + core::option<syntax::ast::initializer>) { s.emit_enum("core::option::t", /*syntax::ast::initializer*/ @@ -3950,7 +3950,7 @@ fn serialize_159<S: std::serialization::serializer>(s: S, /*core::option::t<@syntax::ast::ty>*/ fn serialize_161<S: std::serialization::serializer>(s: S, v: - core::option::t<@syntax::ast::ty>) { + core::option<@syntax::ast::ty>) { s.emit_enum("core::option::t", /*@syntax::ast::ty*/ @@ -4471,7 +4471,7 @@ fn deserialize_20<S: std::serialization::deserializer>(s: S) -> uint { } /*core::option::t<syntax::codemap::span>*/ fn deserialize_26<S: std::serialization::deserializer>(s: S) -> - core::option::t<syntax::codemap::span> { + core::option<syntax::codemap::span> { s.read_enum("core::option::t", @@ -4492,7 +4492,7 @@ fn deserialize_26<S: std::serialization::deserializer>(s: S) -> } /*{name: str,span: core::option::t<syntax::codemap::span>}*/ fn deserialize_25<S: std::serialization::deserializer>(s: S) -> - {name: str, span: core::option::t<syntax::codemap::span>,} { + {name: str, span: core::option<syntax::codemap::span>,} { s.read_rec( @@ -4513,7 +4513,7 @@ fn deserialize_25<S: std::serialization::deserializer>(s: S) -> /*{call_site: syntax::codemap::span,callie: {name: str,span: core::option::t<syntax::codemap::span>}}*/ fn deserialize_24<S: std::serialization::deserializer>(s: S) -> {call_site: syntax::codemap::span, - callie: {name: str, span: core::option::t<syntax::codemap::span>,},} { + callie: {name: str, span: core::option<syntax::codemap::span>,},} { s.read_rec( @@ -5501,7 +5501,7 @@ fn deserialize_76<S: std::serialization::deserializer>(s: S) -> } /*core::option::t<@syntax::ast::expr>*/ fn deserialize_79<S: std::serialization::deserializer>(s: S) -> - core::option::t<@syntax::ast::expr> { + core::option<@syntax::ast::expr> { s.read_enum("core::option::t", @@ -5522,7 +5522,7 @@ fn deserialize_79<S: std::serialization::deserializer>(s: S) -> } /*[core::option::t<@syntax::ast::expr>]*/ fn deserialize_80<S: std::serialization::deserializer>(s: S) -> - [core::option::t<@syntax::ast::expr>] { + [core::option<@syntax::ast::expr>] { s.read_vec( /*core::option::t<@syntax::ast::expr>*/ @@ -5886,7 +5886,7 @@ fn deserialize_85<S: std::serialization::deserializer>(s: S) -> } /*core::option::t<@syntax::ast::pat>*/ fn deserialize_112<S: std::serialization::deserializer>(s: S) -> - core::option::t<@syntax::ast::pat> { + core::option<@syntax::ast::pat> { s.read_enum("core::option::t", @@ -6114,7 +6114,7 @@ fn deserialize_117<S: std::serialization::deserializer>(s: S) -> } /*core::option::t<syntax::ast::initializer>*/ fn deserialize_116<S: std::serialization::deserializer>(s: S) -> - core::option::t<syntax::ast::initializer> { + core::option<syntax::ast::initializer> { s.read_enum("core::option::t", @@ -7890,7 +7890,7 @@ fn deserialize_159<S: std::serialization::deserializer>(s: S) -> } /*core::option::t<@syntax::ast::ty>*/ fn deserialize_161<S: std::serialization::deserializer>(s: S) -> - core::option::t<@syntax::ast::ty> { + core::option<@syntax::ast::ty> { s.read_enum("core::option::t", diff --git a/src/rustc/middle/trans/closure.rs b/src/rustc/middle/trans/closure.rs index 25215be9ef9..a6bc7cbb732 100644 --- a/src/rustc/middle/trans/closure.rs +++ b/src/rustc/middle/trans/closure.rs @@ -183,7 +183,7 @@ fn allocate_cbox(bcx: block, fn store_uniq_tydesc(bcx: block, cdata_ty: ty::t, box: ValueRef, - &ti: option::t<@tydesc_info>) -> block { + &ti: option<@tydesc_info>) -> block { let ccx = bcx.ccx(); let bound_tydesc = GEPi(bcx, box, [0, abi::box_field_tydesc]); let {bcx, val: td} = base::get_tydesc(bcx, cdata_ty, true, ti); diff --git a/src/rustc/middle/ty.rs b/src/rustc/middle/ty.rs index ea5347a6074..5f5ac939a22 100644 --- a/src/rustc/middle/ty.rs +++ b/src/rustc/middle/ty.rs @@ -1509,7 +1509,7 @@ fn arg_mode(cx: ctxt, a: arg) -> ast::rmode { resolved_mode(cx, a.mode) } // Unifies `m1` and `m2`. Returns unified value or failure code. fn unify_mode(cx: ctxt, m1: ast::mode, m2: ast::mode) - -> result::t<ast::mode, type_err> { + -> result<ast::mode, type_err> { alt (canon_mode(cx, m1), canon_mode(cx, m2)) { (m1, m2) if (m1 == m2) { result::ok(m1) @@ -1758,7 +1758,7 @@ mod unify { }; } fn unify_args(cx: @uctxt, e_args: [arg], a_args: [arg], - variance: variance) -> either::t<result, [arg]> { + variance: variance) -> either<result, [arg]> { if !vec::same_length(e_args, a_args) { ret either::left(ures_err(terr_arg_count)); } diff --git a/src/rustc/middle/typeck.rs b/src/rustc/middle/typeck.rs index 8341c8f2e7b..e8d47886665 100644 --- a/src/rustc/middle/typeck.rs +++ b/src/rustc/middle/typeck.rs @@ -1701,7 +1701,7 @@ fn impl_self_ty(tcx: ty::ctxt, did: ast::def_id) -> {n_tps: uint, ty: ty::t} { fn lookup_method(fcx: @fn_ctxt, expr: @ast::expr, node_id: ast::node_id, name: ast::ident, ty: ty::t, tps: [ty::t]) - -> option::t<method_origin> { + -> option<method_origin> { alt lookup_method_inner(fcx, expr, name, ty) { some({method_ty: fty, n_tps: method_n_tps, substs, origin, self_sub}) { let tcx = fcx.ccx.tcx; @@ -1743,9 +1743,9 @@ fn lookup_method(fcx: @fn_ctxt, expr: @ast::expr, node_id: ast::node_id, fn lookup_method_inner(fcx: @fn_ctxt, expr: @ast::expr, name: ast::ident, ty: ty::t) - -> option::t<{method_ty: ty::t, n_tps: uint, substs: [ty::t], + -> option<{method_ty: ty::t, n_tps: uint, substs: [ty::t], origin: method_origin, - self_sub: option::t<self_subst>}> { + self_sub: option<self_subst>}> { let tcx = fcx.ccx.tcx; // First, see whether this is an interface-bounded parameter alt ty::get(ty).struct { @@ -2120,8 +2120,8 @@ fn check_expr_with_unifier(fcx: @fn_ctxt, expr: @ast::expr, unify: unifier, } } fn lookup_op_method(fcx: @fn_ctxt, op_ex: @ast::expr, self_t: ty::t, - opname: str, args: [option::t<@ast::expr>]) - -> option::t<ty::t> { + opname: str, args: [option<@ast::expr>]) + -> option<ty::t> { let callee_id = ast_util::op_expr_callee_id(op_ex); alt lookup_method(fcx, op_ex, callee_id, opname, self_t, []) { some(origin) { diff --git a/src/rustc/syntax/ast.rs b/src/rustc/syntax/ast.rs index 46e31799232..91a884ce57c 100644 --- a/src/rustc/syntax/ast.rs +++ b/src/rustc/syntax/ast.rs @@ -291,10 +291,10 @@ enum blk_sort { type mac = spanned<mac_>; -type mac_arg = option::t<@expr>; +type mac_arg = option<@expr>; type mac_body_ = {span: span}; -type mac_body = option::t<mac_body_>; +type mac_body = option<mac_body_>; enum mac_ { mac_invoc(@path, mac_arg, mac_body), diff --git a/src/rustc/syntax/parse/parser.rs b/src/rustc/syntax/parse/parser.rs index 6fd61bc9db4..4beefe21632 100644 --- a/src/rustc/syntax/parse/parser.rs +++ b/src/rustc/syntax/parse/parser.rs @@ -643,7 +643,7 @@ fn parse_seq<T: copy>(bra: token::token, ket: token::token, ret spanned(lo, hi, result); } -fn have_dollar(p: parser) -> option::t<ast::mac_> { +fn have_dollar(p: parser) -> option<ast::mac_> { alt p.token { token::DOLLAR_NUM(num) { p.bump(); @@ -2384,7 +2384,7 @@ else { ret none; } // A type to distingush between the parsing of item attributes or syntax // extensions, which both begin with token.POUND -type attr_or_ext = option<either::t<[ast::attribute], @ast::expr>>; +type attr_or_ext = option<either<[ast::attribute], @ast::expr>>; fn parse_outer_attrs_or_ext( p: parser, diff --git a/src/rustc/util/filesearch.rs b/src/rustc/util/filesearch.rs index 82469b5cb32..c37bb519702 100644 --- a/src/rustc/util/filesearch.rs +++ b/src/rustc/util/filesearch.rs @@ -109,12 +109,12 @@ fn get_sysroot(maybe_sysroot: option<path>) -> path { } } -fn get_cargo_sysroot() -> result::t<path, str> { +fn get_cargo_sysroot() -> result<path, str> { let path = [get_default_sysroot(), libdir(), "cargo"]; result::ok(path::connect_many(path)) } -fn get_cargo_root() -> result::t<path, str> { +fn get_cargo_root() -> result<path, str> { alt os::getenv("CARGO_ROOT") { some(_p) { result::ok(_p) } none { @@ -126,7 +126,7 @@ fn get_cargo_root() -> result::t<path, str> { } } -fn get_cargo_root_nearest() -> result::t<path, str> { +fn get_cargo_root_nearest() -> result<path, str> { result::chain(get_cargo_root()) { |p| let cwd = os::getcwd(); let dirname = path::dirname(cwd); @@ -151,13 +151,13 @@ fn get_cargo_root_nearest() -> result::t<path, str> { } } -fn get_cargo_lib_path() -> result::t<path, str> { +fn get_cargo_lib_path() -> result<path, str> { result::chain(get_cargo_root()) { |p| result::ok(path::connect(p, libdir())) } } -fn get_cargo_lib_path_nearest() -> result::t<path, str> { +fn get_cargo_lib_path_nearest() -> result<path, str> { result::chain(get_cargo_root_nearest()) { |p| result::ok(path::connect(p, libdir())) } |
