@@ -52,7 +52,6 @@ use util::ppaux;
52
52
use util:: ppaux:: { ty_to_str, ty_to_short_str} ;
53
53
use syntax:: diagnostic:: expect;
54
54
use util:: common:: indenter;
55
- use ty:: DerivedMethodInfo ;
56
55
57
56
use build:: * ;
58
57
use shape:: * ;
@@ -1878,10 +1877,6 @@ fn trans_item(ccx: @crate_ctxt, item: ast::item) {
1878
1877
}
1879
1878
}
1880
1879
ast:: item_impl( tps, _, _, ms) => {
1881
- // This call will do nothing if there are no derivable methods.
1882
- deriving:: trans_deriving_impl ( ccx, * path, item. ident , tps,
1883
- item. id ) ;
1884
-
1885
1880
meth:: trans_impl ( ccx, * path, item. ident , ms, tps, None ,
1886
1881
item. id ) ;
1887
1882
}
@@ -2112,20 +2107,7 @@ fn get_item_val(ccx: @crate_ctxt, id: ast::node_id) -> ValueRef {
2112
2107
match ccx. item_vals . find ( id) {
2113
2108
Some ( v) => v,
2114
2109
None => {
2115
- // First, check whether we need to automatically generate a method
2116
- // via the deriving mechanism.
2117
- match ccx. tcx . automatically_derived_methods . find ( local_def ( id) ) {
2118
- None => { } // Continue.
2119
- Some ( ref derived_method_info) => {
2120
- // XXX: Mark as internal if necessary.
2121
- let llfn = register_deriving_method (
2122
- ccx, id, derived_method_info) ;
2123
- ccx. item_vals . insert ( id, llfn) ;
2124
- return llfn;
2125
- }
2126
- }
2127
2110
2128
- // Failing that, look for an item.
2129
2111
let mut exprt = false ;
2130
2112
let val = match ccx. tcx . items . get ( id) {
2131
2113
ast_map:: node_item( i, pth) => {
@@ -2273,34 +2255,6 @@ fn register_method(ccx: @crate_ctxt, id: ast::node_id, pth: @ast_map::path,
2273
2255
llfn
2274
2256
}
2275
2257
2276
- fn register_deriving_method ( ccx : @crate_ctxt ,
2277
- id : ast:: node_id ,
2278
- derived_method_info : & DerivedMethodInfo ) ->
2279
- ValueRef {
2280
- // Find the path of the item.
2281
- let path, span;
2282
- match ccx. tcx . items . get ( derived_method_info. containing_impl . node ) {
2283
- ast_map:: node_item( item, found_path) => {
2284
- path = found_path;
2285
- span = item. span ;
2286
- }
2287
- _ => {
2288
- ccx. tcx . sess . bug ( ~"derived method info containing impl didn' t \
2289
- refer to an item") ;
2290
- }
2291
- }
2292
-
2293
- let path = vec:: append ( * path, ~[
2294
- ast_map:: path_mod (
2295
- ccx. sess . parse_sess . interner . intern ( @fmt ! ( "__derived%d__" , id) ) ) ,
2296
- ast_map:: path_name ( derived_method_info. method_info . ident )
2297
- ] ) ;
2298
- let mty = ty:: lookup_item_type ( ccx. tcx , local_def ( id) ) . ty ;
2299
- let llfn = register_fn_full ( ccx, span, path, id, mty) ;
2300
- // XXX: Inline hint.
2301
- llfn
2302
- }
2303
-
2304
2258
// The constant translation pass.
2305
2259
fn trans_constant ( ccx : @crate_ctxt , it : @ast:: item ) {
2306
2260
let _icx = ccx. insn_ctxt ( "trans_constant" ) ;
0 commit comments