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:
parent
3e14ada4f6
commit
32ad4ae4cd
29 changed files with 335 additions and 272 deletions
|
@ -249,13 +249,11 @@ fn noop_fold_item_underscore(i: item_, fld: ast_fold) -> item_ {
|
|||
let struct_def = fold_struct_def(struct_def, fld);
|
||||
item_class(struct_def, /* FIXME (#2543) */ copy typms)
|
||||
}
|
||||
item_impl(tps, ifce, ty, ref methods_opt) => {
|
||||
item_impl(tps, ifce, ty, ref methods) => {
|
||||
item_impl(fold_ty_params(tps, fld),
|
||||
ifce.map(|p| fold_trait_ref(*p, fld)),
|
||||
fld.fold_ty(ty),
|
||||
option::map(methods_opt,
|
||||
|methods| vec::map(
|
||||
*methods, |x| fld.fold_method(*x))))
|
||||
vec::map(*methods, |x| fld.fold_method(*x)))
|
||||
}
|
||||
item_trait(tps, traits, methods) => {
|
||||
let methods = do methods.map |method| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue