Skip to content

Commit 0eae490

Browse files
committed
rustc: Stub a table of borrowings
1 parent c56910f commit 0eae490

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/rustc/middle/ty.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,12 @@ enum ast_ty_to_ty_cache_entry {
177177
atttce_resolved(t) /* resolved to a type, irrespective of region */
178178
}
179179

180+
enum borrowing {
181+
bo_none,
182+
bo_box(@borrowing),
183+
bo_uniq(@borrowing)
184+
}
185+
180186
type ctxt =
181187
@{interner: hashmap<intern_key, t_box>,
182188
mutable next_id: uint,
@@ -196,7 +202,8 @@ type ctxt =
196202
enum_var_cache: hashmap<def_id, @[variant_info]>,
197203
iface_method_cache: hashmap<def_id, @[method]>,
198204
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>};
200207

201208
type t_box = @{struct: sty,
202209
id: uint,
@@ -381,7 +388,8 @@ fn mk_ctxt(s: session::session, dm: resolve::def_map, amap: ast_map::map,
381388
enum_var_cache: new_def_hash(),
382389
iface_method_cache: new_def_hash(),
383390
ty_param_bounds: map::int_hash(),
384-
inferred_modes: map::int_hash()}
391+
inferred_modes: map::int_hash(),
392+
borrowings: map::int_hash()}
385393
}
386394

387395

0 commit comments

Comments
 (0)