@@ -624,13 +624,13 @@ fn scope_is_fn(sc: &scope) -> bool {
624
624
625
625
fn def_is_local ( d : & def ) -> bool {
626
626
ret alt d {
627
- ast : : def_arg ( _) | ast:: def_local ( _) | ast:: def_binding ( _) { true }
628
- _ { false }
629
- } ;
627
+ ast : : def_arg ( _ , _) | ast:: def_local ( _) | ast:: def_binding ( _) { true }
628
+ _ { false }
629
+ } ;
630
630
}
631
631
632
632
fn def_is_obj_field ( d : & def ) -> bool {
633
- ret alt d { ast : : def_obj_field ( _) { true } _ { false } } ;
633
+ ret alt d { ast : : def_obj_field ( _, _ ) { true } _ { false } } ;
634
634
}
635
635
636
636
fn def_is_ty_arg ( d : & def ) -> bool {
@@ -764,7 +764,7 @@ fn lookup_in_fn(name: &ident, decl: &ast::fn_decl,
764
764
ns_value. {
765
765
for a: ast:: arg in decl. inputs {
766
766
if istr:: eq ( a. ident , name) {
767
- ret some ( ast:: def_arg ( local_def ( a. id ) ) ) ;
767
+ ret some ( ast:: def_arg ( local_def ( a. id ) , a . mode ) ) ;
768
768
}
769
769
}
770
770
ret none :: < def > ;
@@ -780,7 +780,7 @@ fn lookup_in_obj(name: &ident, ob: &ast::_obj, ty_params: &[ast::ty_param],
780
780
ns_value. {
781
781
for f: ast:: obj_field in ob. fields {
782
782
if istr:: eq ( f. ident , name) {
783
- ret some ( ast:: def_obj_field ( local_def ( f. id ) ) ) ;
783
+ ret some ( ast:: def_obj_field ( local_def ( f. id ) , f . mut ) ) ;
784
784
}
785
785
}
786
786
ret none :: < def > ;
@@ -1170,19 +1170,19 @@ fn index_nmod(md: &ast::native_mod) -> mod_index {
1170
1170
// External lookups
1171
1171
fn ns_for_def ( d : def ) -> namespace {
1172
1172
ret alt d {
1173
- ast : : def_fn ( id , _) { ns_value }
1174
- ast:: def_obj_field ( id ) { ns_value }
1175
- ast:: def_mod ( id ) { ns_module }
1176
- ast:: def_native_mod ( id ) { ns_module }
1177
- ast:: def_const ( id ) { ns_value }
1178
- ast:: def_arg ( id ) { ns_value }
1179
- ast:: def_local ( id ) { ns_value }
1180
- ast:: def_variant ( _, id ) { ns_value }
1181
- ast:: def_ty ( id ) { ns_type }
1182
- ast:: def_binding ( id ) { ns_type }
1183
- ast:: def_use ( id ) { ns_module }
1184
- ast:: def_native_ty ( id ) { ns_type }
1185
- ast:: def_native_fn ( id ) { ns_value }
1173
+ ast : : def_fn ( _ , _) { ns_value }
1174
+ ast:: def_obj_field ( _ , _ ) { ns_value }
1175
+ ast:: def_mod ( _ ) { ns_module }
1176
+ ast:: def_native_mod ( _ ) { ns_module }
1177
+ ast:: def_const ( _ ) { ns_value }
1178
+ ast:: def_arg ( _ , _ ) { ns_value }
1179
+ ast:: def_local ( _ ) { ns_value }
1180
+ ast:: def_variant ( _, _ ) { ns_value }
1181
+ ast:: def_ty ( _ ) { ns_type }
1182
+ ast:: def_binding ( _ ) { ns_type }
1183
+ ast:: def_use ( _ ) { ns_module }
1184
+ ast:: def_native_ty ( _ ) { ns_type }
1185
+ ast:: def_native_fn ( _ ) { ns_value }
1186
1186
} ;
1187
1187
}
1188
1188
0 commit comments