rustc: Implement typechecking for simple monomorphic derivable traits on monomorphic types. r=brson

This commit is contained in:
Patrick Walton
2012-10-22 17:57:10 -07:00
parent 575950d12c
commit 3bf0a9b094
23 changed files with 422 additions and 123 deletions

View File

@@ -202,11 +202,13 @@ fn map_item(i: @item, cx: ctx, v: vt) {
let item_path = @/* FIXME (#2543) */ copy cx.path;
cx.map.insert(i.id, node_item(i, item_path));
match i.node {
item_impl(_, _, _, ms) => {
item_impl(_, _, _, ms_opt) => {
let impl_did = ast_util::local_def(i.id);
for ms.each |m| {
map_method(impl_did, extend(cx, i.ident), *m,
cx);
for ms_opt.each |ms| {
for ms.each |m| {
map_method(impl_did, extend(cx, i.ident), *m,
cx);
}
}
}
item_enum(enum_definition, _) => {