mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 02:33:55 +00:00
rustc: Resolve tag names in the typechecker
This commit is contained in:
parent
0d3400fec2
commit
2a8350e8d9
@ -435,7 +435,9 @@ fn collect_item_types(@ast.crate crate) -> tup(@ast.crate, @ty_table) {
|
||||
}
|
||||
|
||||
case (ast.item_tag(_, _, _, ?def_id)) {
|
||||
item_to_ty.insert(def_id, plain_ty(ty_tag(def_id)));
|
||||
auto ty = plain_ty(ty_tag(def_id));
|
||||
item_to_ty.insert(def_id, ty);
|
||||
ret ty;
|
||||
}
|
||||
|
||||
case (ast.item_mod(_, _, _)) { fail; }
|
||||
@ -485,6 +487,9 @@ fn collect_item_types(@ast.crate crate) -> tup(@ast.crate, @ty_table) {
|
||||
case (ast.item_ty(_, _, _, ?def_id, _)) {
|
||||
id_to_ty_item.insert(def_id, i);
|
||||
}
|
||||
case (ast.item_tag(_, _, _, ?def_id)) {
|
||||
id_to_ty_item.insert(def_id, i);
|
||||
}
|
||||
case (_) { /* empty */ }
|
||||
}
|
||||
ret id_to_ty_item;
|
||||
|
Loading…
Reference in New Issue
Block a user