@@ -177,6 +177,12 @@ enum ast_ty_to_ty_cache_entry {
177
177
atttce_resolved( t ) /* resolved to a type, irrespective of region */
178
178
}
179
179
180
+ enum borrowing {
181
+ bo_none,
182
+ bo_box( @borrowing ) ,
183
+ bo_uniq( @borrowing )
184
+ }
185
+
180
186
type ctxt =
181
187
@{ interner : hashmap < intern_key , t_box > ,
182
188
mutable next_id: uint ,
@@ -196,7 +202,8 @@ type ctxt =
196
202
enum_var_cache : hashmap < def_id , @[ variant_info ] > ,
197
203
iface_method_cache : hashmap < def_id , @[ method ] > ,
198
204
ty_param_bounds : hashmap < ast:: node_id , param_bounds > ,
199
- inferred_modes : hashmap < ast:: node_id , ast:: mode > } ;
205
+ inferred_modes : hashmap < ast:: node_id , ast:: mode > ,
206
+ borrowings : hashmap < ast:: node_id , borrowing > } ;
200
207
201
208
type t_box = @{ struct : sty ,
202
209
id : uint ,
@@ -381,7 +388,8 @@ fn mk_ctxt(s: session::session, dm: resolve::def_map, amap: ast_map::map,
381
388
enum_var_cache: new_def_hash ( ) ,
382
389
iface_method_cache: new_def_hash ( ) ,
383
390
ty_param_bounds: map:: int_hash ( ) ,
384
- inferred_modes: map:: int_hash ( ) }
391
+ inferred_modes: map:: int_hash ( ) ,
392
+ borrowings: map:: int_hash ( ) }
385
393
}
386
394
387
395
0 commit comments