@@ -197,7 +197,7 @@ pub fn get_extern_const(externs: ExternMap, llmod: ModuleRef,
197
197
}
198
198
199
199
pub fn trans_foreign_call ( cx : block , externs : ExternMap ,
200
- llmod : ModuleRef , name : @str , args : ~ [ ValueRef ] ) ->
200
+ llmod : ModuleRef , name : @str , args : & [ ValueRef ] ) ->
201
201
ValueRef {
202
202
let _icx = cx. insn_ctxt ( "trans_foreign_call" ) ;
203
203
let n = args. len ( ) as int ;
@@ -242,7 +242,7 @@ pub fn bump_ptr(bcx: block, t: ty::t, base: ValueRef, sz: ValueRef) ->
242
242
// @llblobptr is the data part of a enum value; its actual type
243
243
// is meaningless, as it will be cast away.
244
244
pub fn GEP_enum ( bcx : block , llblobptr : ValueRef , enum_id : ast:: def_id ,
245
- variant_id : ast:: def_id , ty_substs : ~ [ ty:: t ] ,
245
+ variant_id : ast:: def_id , ty_substs : & [ ty:: t ] ,
246
246
ix : uint ) -> ValueRef {
247
247
let _icx = bcx. insn_ctxt ( "GEP_enum" ) ;
248
248
let ccx = bcx. ccx ( ) ;
@@ -449,7 +449,7 @@ pub fn set_inline_hint(f: ValueRef) {
449
449
}
450
450
}
451
451
452
- pub fn set_inline_hint_if_appr ( attrs : ~ [ ast:: attribute ] ,
452
+ pub fn set_inline_hint_if_appr ( attrs : & [ ast:: attribute ] ,
453
453
llfn : ValueRef ) {
454
454
match attr:: find_inline_attr ( attrs) {
455
455
attr:: ia_hint => set_inline_hint ( llfn) ,
@@ -489,7 +489,7 @@ pub fn note_unique_llvm_symbol(ccx: @CrateContext, +sym: ~str) {
489
489
490
490
491
491
pub fn get_res_dtor(ccx: @CrateContext, did: ast::def_id,
492
- parent_id: ast::def_id, substs: ~ [ty::t])
492
+ parent_id: ast::def_id, substs: & [ty::t])
493
493
-> ValueRef {
494
494
let _icx = ccx.insn_ctxt(" trans_res_dtor") ;
495
495
if !substs. is_empty ( ) {
@@ -516,7 +516,7 @@ pub fn get_res_dtor(ccx: @CrateContext, did: ast::def_id,
516
516
}
517
517
518
518
// Structural comparison: a rather involved form of glue.
519
- pub fn maybe_name_value ( cx : @CrateContext , v : ValueRef , s : ~ str ) {
519
+ pub fn maybe_name_value ( cx : @CrateContext , v : ValueRef , s : & str ) {
520
520
if cx. sess . opts . save_temps {
521
521
let _: ( ) = str:: as_c_str ( s, |buf| {
522
522
unsafe {
@@ -641,7 +641,7 @@ pub fn iter_structural_ty(cx: block, av: ValueRef, t: ty::t,
641
641
642
642
fn iter_variant ( cx : block , a_tup : ValueRef ,
643
643
variant : ty:: VariantInfo ,
644
- tps : ~ [ ty:: t ] , tid : ast:: def_id ,
644
+ tps : & [ ty:: t ] , tid : ast:: def_id ,
645
645
f : val_and_ty_fn ) -> block {
646
646
let _icx = cx. insn_ctxt ( "iter_variant" ) ;
647
647
if variant. args . len ( ) == 0 u { return cx; }
@@ -916,7 +916,7 @@ pub fn have_cached_lpad(bcx: block) -> bool {
916
916
return res;
917
917
}
918
918
919
- pub fn in_lpad_scope_cx ( bcx : block , f : fn ( & mut scope_info ) ) {
919
+ pub fn in_lpad_scope_cx ( bcx : block , f : fn ( + si : & mut scope_info ) ) {
920
920
let mut bcx = bcx;
921
921
loop {
922
922
{
@@ -1652,7 +1652,7 @@ pub fn new_fn_ctxt(ccx: @CrateContext,
1652
1652
// field of the fn_ctxt with
1653
1653
pub fn create_llargs_for_fn_args(cx: fn_ctxt,
1654
1654
ty_self: self_arg,
1655
- args: ~ [ast::arg]) -> ~[ValueRef] {
1655
+ args: & [ast::arg]) -> ~[ValueRef] {
1656
1656
let _icx = cx.insn_ctxt(" create_llargs_for_fn_args") ;
1657
1657
1658
1658
match ty_self {
@@ -1865,7 +1865,7 @@ pub fn trans_fn(ccx: @CrateContext,
1865
1865
debug ! ( "trans_fn(ty_self=%?)" , ty_self) ;
1866
1866
let _icx = ccx. insn_ctxt ( "trans_fn" ) ;
1867
1867
ccx. stats . n_fns += 1 ;
1868
- let the_path_str = path_str ( ccx. sess , path) ;
1868
+ let the_path_str = path_str ( ccx. sess , & path) ;
1869
1869
trans_closure ( ccx, path, decl, body, llfndecl, ty_self,
1870
1870
param_substs, id, impl_id,
1871
1871
|fcx| {
@@ -1883,7 +1883,7 @@ pub fn trans_fn(ccx: @CrateContext,
1883
1883
pub fn trans_enum_variant ( ccx : @CrateContext ,
1884
1884
enum_id : ast:: node_id ,
1885
1885
variant : ast:: variant ,
1886
- args : ~ [ ast:: variant_arg ] ,
1886
+ args : & [ ast:: variant_arg ] ,
1887
1887
disr : int ,
1888
1888
is_degen : bool ,
1889
1889
param_substs : Option < @param_substs > ,
@@ -1946,7 +1946,7 @@ pub fn trans_enum_variant(ccx: @CrateContext,
1946
1946
// NB: In theory this should be merged with the function above. But the AST
1947
1947
// structures are completely different, so very little code would be shared.
1948
1948
pub fn trans_tuple_struct(ccx: @CrateContext,
1949
- fields: ~ [@ast::struct_field],
1949
+ fields: & [@ast::struct_field],
1950
1950
ctor_id: ast::node_id,
1951
1951
param_substs: Option<@param_substs>,
1952
1952
llfndecl: ValueRef) {
@@ -2079,15 +2079,15 @@ pub fn trans_item(ccx: @CrateContext, item: ast::item) {
2079
2079
_ => fail!(~" trans_item"),
2080
2080
};
2081
2081
match /*bad*/copy item.node {
2082
- ast::item_fn(ref decl, purity, ref generics , ref body) => {
2082
+ ast::item_fn(ref decl, purity, ref tps , ref body) => {
2083
2083
if purity == ast::extern_fn {
2084
2084
let llfndecl = get_item_val(ccx, item.id);
2085
2085
foreign::trans_foreign_fn(ccx,
2086
2086
vec::append(
2087
2087
/*bad*/copy *path,
2088
2088
~[path_name(item.ident)]),
2089
2089
decl, body, llfndecl, item.id);
2090
- } else if !generics.is_type_parameterized () {
2090
+ } else if tps.is_empty () {
2091
2091
let llfndecl = get_item_val(ccx, item.id);
2092
2092
trans_fn(ccx,
2093
2093
vec::append(/*bad*/copy *path, ~[path_name(item.ident)]),
@@ -2111,8 +2111,8 @@ pub fn trans_item(ccx: @CrateContext, item: ast::item) {
2111
2111
ast::item_mod(ref m) => {
2112
2112
trans_mod(ccx, m);
2113
2113
}
2114
- ast::item_enum(ref enum_definition, ref generics ) => {
2115
- if !generics.is_type_parameterized () {
2114
+ ast::item_enum(ref enum_definition, ref tps ) => {
2115
+ if tps.is_empty () {
2116
2116
let degen = (*enum_definition).variants.len() == 1u;
2117
2117
let vi = ty::enum_variants(ccx.tcx, local_def(item.id));
2118
2118
let mut i = 0;
@@ -2128,8 +2128,8 @@ pub fn trans_item(ccx: @CrateContext, item: ast::item) {
2128
2128
};
2129
2129
foreign::trans_foreign_mod(ccx, foreign_mod, abi);
2130
2130
}
2131
- ast::item_struct(struct_def, generics ) => {
2132
- if !generics.is_type_parameterized () {
2131
+ ast::item_struct(struct_def, tps ) => {
2132
+ if tps.is_empty () {
2133
2133
trans_struct_def(ccx, struct_def, path, item.id);
2134
2134
}
2135
2135
}
@@ -2847,7 +2847,7 @@ pub fn trap(bcx: block) {
2847
2847
}
2848
2848
}
2849
2849
2850
- pub fn decl_gc_metadata(ccx: @CrateContext, llmod_id: ~ str) {
2850
+ pub fn decl_gc_metadata(ccx: @CrateContext, llmod_id: & str) {
2851
2851
if !ccx.sess.opts.gc || !*ccx.uses_gc {
2852
2852
return;
2853
2853
}
@@ -3014,7 +3014,7 @@ pub fn trans_crate(sess: session::Session,
3014
3014
tcx: ty::ctxt,
3015
3015
output: &Path,
3016
3016
emap2: resolve::ExportMap2,
3017
- maps: astencode::Maps) -> (ModuleRef, LinkMeta) {
3017
+ + maps: astencode::Maps) -> (ModuleRef, LinkMeta) {
3018
3018
3019
3019
let symbol_hasher = @hash::default_state();
3020
3020
let link_meta =
0 commit comments