@@ -251,7 +251,7 @@ pub struct FnCtxt {
251
251
252
252
inh : @Inherited ,
253
253
254
- ccx : @mut CrateCtxt ,
254
+ ccx : @CrateCtxt ,
255
255
}
256
256
257
257
impl Inherited {
@@ -272,7 +272,7 @@ impl Inherited {
272
272
}
273
273
274
274
// Used by check_const and check_enum_variants
275
- pub fn blank_fn_ctxt ( ccx : @mut CrateCtxt ,
275
+ pub fn blank_fn_ctxt ( ccx : @CrateCtxt ,
276
276
rty : ty:: t ,
277
277
region_bnd : ast:: NodeId )
278
278
-> @FnCtxt {
@@ -302,7 +302,7 @@ impl ExprTyProvider for FnCtxt {
302
302
}
303
303
}
304
304
305
- struct CheckItemTypesVisitor { ccx : @mut CrateCtxt }
305
+ struct CheckItemTypesVisitor { ccx : @CrateCtxt }
306
306
307
307
impl Visitor < ( ) > for CheckItemTypesVisitor {
308
308
fn visit_item ( & mut self , i : @ast:: item , _: ( ) ) {
@@ -311,12 +311,12 @@ impl Visitor<()> for CheckItemTypesVisitor {
311
311
}
312
312
}
313
313
314
- pub fn check_item_types ( ccx : @mut CrateCtxt , crate : & ast:: Crate ) {
314
+ pub fn check_item_types ( ccx : @CrateCtxt , crate : & ast:: Crate ) {
315
315
let mut visit = CheckItemTypesVisitor { ccx : ccx } ;
316
316
visit:: walk_crate ( & mut visit, crate , ( ) ) ;
317
317
}
318
318
319
- pub fn check_bare_fn ( ccx : @mut CrateCtxt ,
319
+ pub fn check_bare_fn ( ccx : @CrateCtxt ,
320
320
decl : & ast:: fn_decl ,
321
321
body : ast:: P < ast:: Block > ,
322
322
id : ast:: NodeId ,
@@ -407,7 +407,7 @@ impl Visitor<()> for GatherLocalsVisitor {
407
407
408
408
}
409
409
410
- pub fn check_fn ( ccx : @mut CrateCtxt ,
410
+ pub fn check_fn ( ccx : @CrateCtxt ,
411
411
opt_self_info : Option < SelfInfo > ,
412
412
purity : ast:: purity ,
413
413
fn_sig : & ty:: FnSig ,
@@ -556,7 +556,7 @@ pub fn check_no_duplicate_fields(tcx: ty::ctxt,
556
556
}
557
557
}
558
558
559
- pub fn check_struct ( ccx : @mut CrateCtxt , id : ast:: NodeId , span : Span ) {
559
+ pub fn check_struct ( ccx : @CrateCtxt , id : ast:: NodeId , span : Span ) {
560
560
let tcx = ccx. tcx ;
561
561
562
562
// Check that the class is instantiable
@@ -567,7 +567,7 @@ pub fn check_struct(ccx: @mut CrateCtxt, id: ast::NodeId, span: Span) {
567
567
}
568
568
}
569
569
570
- pub fn check_item ( ccx : @mut CrateCtxt , it : @ast:: item ) {
570
+ pub fn check_item ( ccx : @CrateCtxt , it : @ast:: item ) {
571
571
debug ! ( "check_item(it.id={}, it.ident={})" ,
572
572
it. id,
573
573
ty:: item_path_str( ccx. tcx, local_def( it. id) ) ) ;
@@ -670,7 +670,7 @@ pub fn check_item(ccx: @mut CrateCtxt, it: @ast::item) {
670
670
}
671
671
}
672
672
673
- fn check_method_body ( ccx : @mut CrateCtxt ,
673
+ fn check_method_body ( ccx : @CrateCtxt ,
674
674
item_generics : & ty:: Generics ,
675
675
self_bound : Option < @ty:: TraitRef > ,
676
676
method : @ast:: method ) {
@@ -722,7 +722,7 @@ fn check_method_body(ccx: @mut CrateCtxt,
722
722
param_env) ;
723
723
}
724
724
725
- fn check_impl_methods_against_trait ( ccx : @mut CrateCtxt ,
725
+ fn check_impl_methods_against_trait ( ccx : @CrateCtxt ,
726
726
impl_span : Span ,
727
727
impl_generics : & ty:: Generics ,
728
728
ast_trait_ref : & ast:: trait_ref ,
@@ -1388,7 +1388,7 @@ pub fn check_lit(fcx: @FnCtxt, lit: @ast::lit) -> ty::t {
1388
1388
}
1389
1389
}
1390
1390
1391
- pub fn valid_range_bounds ( ccx : @mut CrateCtxt ,
1391
+ pub fn valid_range_bounds ( ccx : @CrateCtxt ,
1392
1392
from : @ast:: Expr ,
1393
1393
to : @ast:: Expr )
1394
1394
-> Option < bool > {
@@ -3443,7 +3443,7 @@ pub fn check_block_with_expected(fcx: @FnCtxt,
3443
3443
fcx. ps . set ( prev) ;
3444
3444
}
3445
3445
3446
- pub fn check_const ( ccx : @mut CrateCtxt ,
3446
+ pub fn check_const ( ccx : @CrateCtxt ,
3447
3447
sp : Span ,
3448
3448
e : @ast:: Expr ,
3449
3449
id : ast:: NodeId ) {
@@ -3519,15 +3519,15 @@ pub fn check_simd(tcx: ty::ctxt, sp: Span, id: ast::NodeId) {
3519
3519
}
3520
3520
}
3521
3521
3522
- pub fn check_enum_variants ( ccx : @mut CrateCtxt ,
3522
+ pub fn check_enum_variants ( ccx : @CrateCtxt ,
3523
3523
sp : Span ,
3524
3524
vs : & [ ast:: P < ast:: variant > ] ,
3525
3525
id : ast:: NodeId ) {
3526
3526
3527
- fn disr_in_range ( ccx : @mut CrateCtxt ,
3527
+ fn disr_in_range ( ccx : @CrateCtxt ,
3528
3528
ty : attr:: IntType ,
3529
3529
disr : ty:: Disr ) -> bool {
3530
- fn uint_in_range ( ccx : @mut CrateCtxt , ty : ast:: uint_ty , disr : ty:: Disr ) -> bool {
3530
+ fn uint_in_range ( ccx : @CrateCtxt , ty : ast:: uint_ty , disr : ty:: Disr ) -> bool {
3531
3531
match ty {
3532
3532
ast:: ty_u8 => disr as u8 as Disr == disr,
3533
3533
ast:: ty_u16 => disr as u16 as Disr == disr,
@@ -3536,7 +3536,7 @@ pub fn check_enum_variants(ccx: @mut CrateCtxt,
3536
3536
ast:: ty_u => uint_in_range ( ccx, ccx. tcx . sess . targ_cfg . uint_type , disr)
3537
3537
}
3538
3538
}
3539
- fn int_in_range ( ccx : @mut CrateCtxt , ty : ast:: int_ty , disr : ty:: Disr ) -> bool {
3539
+ fn int_in_range ( ccx : @CrateCtxt , ty : ast:: int_ty , disr : ty:: Disr ) -> bool {
3540
3540
match ty {
3541
3541
ast:: ty_i8 => disr as i8 as Disr == disr,
3542
3542
ast:: ty_i16 => disr as i16 as Disr == disr,
@@ -3551,7 +3551,7 @@ pub fn check_enum_variants(ccx: @mut CrateCtxt,
3551
3551
}
3552
3552
}
3553
3553
3554
- fn do_check ( ccx : @mut CrateCtxt ,
3554
+ fn do_check ( ccx : @CrateCtxt ,
3555
3555
vs : & [ ast:: P < ast:: variant > ] ,
3556
3556
id : ast:: NodeId ,
3557
3557
hint : attr:: ReprAttr )
@@ -3923,7 +3923,7 @@ pub fn may_break(cx: ty::ctxt, id: ast::NodeId, b: ast::P<ast::Block>) -> bool {
3923
3923
} } ) )
3924
3924
}
3925
3925
3926
- pub fn check_bounds_are_used ( ccx : @mut CrateCtxt ,
3926
+ pub fn check_bounds_are_used ( ccx : @CrateCtxt ,
3927
3927
span : Span ,
3928
3928
tps : & OptVec < ast:: TyParam > ,
3929
3929
ty : ty:: t ) {
@@ -3953,8 +3953,8 @@ pub fn check_bounds_are_used(ccx: @mut CrateCtxt,
3953
3953
}
3954
3954
}
3955
3955
3956
- pub fn check_intrinsic_type ( ccx : @mut CrateCtxt , it : @ast:: foreign_item ) {
3957
- fn param ( ccx : @mut CrateCtxt , n : uint ) -> ty:: t {
3956
+ pub fn check_intrinsic_type ( ccx : @CrateCtxt , it : @ast:: foreign_item ) {
3957
+ fn param ( ccx : @CrateCtxt , n : uint ) -> ty:: t {
3958
3958
ty:: mk_param ( ccx. tcx , n, local_def ( 0 ) )
3959
3959
}
3960
3960
0 commit comments