librustc: Require the #[derivable] attribute, remove the significance of "impl Foo : Bar;", and allow only a subset of methods in a trait to be derived. r=brson

This commit is contained in:
Patrick Walton
2012-11-13 19:08:01 -08:00
parent 3e14ada4f6
commit 32ad4ae4cd
29 changed files with 335 additions and 272 deletions

View File

@@ -203,12 +203,10 @@ 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_opt) => {
item_impl(_, _, _, ms) => {
let impl_did = ast_util::local_def(i.id);
for ms_opt.each |ms| {
for ms.each |m| {
map_method(impl_did, extend(cx, i.ident), *m, cx);
}
for ms.each |m| {
map_method(impl_did, extend(cx, i.ident), *m, cx);
}
}
item_enum(enum_definition, _) => {