Skip to content

Commit 67b1ce5

Browse files
committed
---
yaml --- r: 35479 b: refs/heads/master c: a7159be h: refs/heads/master i: 35477: 48c9b02 35475: 523a5de 35471: 1457fd6 v: v3
1 parent 74e9bc1 commit 67b1ce5

17 files changed

+18
-1303
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 6439f2d54645915ce57f4c229811719e8e498151
2+
refs/heads/master: a7159be24a9c81517a46e09c7ff62cadc72759b6
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
55
refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024

trunk/src/librustc/middle/trans/base.rs

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ use util::ppaux;
5252
use util::ppaux::{ty_to_str, ty_to_short_str};
5353
use syntax::diagnostic::expect;
5454
use util::common::indenter;
55-
use ty::DerivedMethodInfo;
5655

5756
use build::*;
5857
use shape::*;
@@ -1878,10 +1877,6 @@ fn trans_item(ccx: @crate_ctxt, item: ast::item) {
18781877
}
18791878
}
18801879
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-
18851880
meth::trans_impl(ccx, *path, item.ident, ms, tps, None,
18861881
item.id);
18871882
}
@@ -2112,20 +2107,7 @@ fn get_item_val(ccx: @crate_ctxt, id: ast::node_id) -> ValueRef {
21122107
match ccx.item_vals.find(id) {
21132108
Some(v) => v,
21142109
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-
}
21272110

2128-
// Failing that, look for an item.
21292111
let mut exprt = false;
21302112
let val = match ccx.tcx.items.get(id) {
21312113
ast_map::node_item(i, pth) => {
@@ -2273,34 +2255,6 @@ fn register_method(ccx: @crate_ctxt, id: ast::node_id, pth: @ast_map::path,
22732255
llfn
22742256
}
22752257

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-
23042258
// The constant translation pass.
23052259
fn trans_constant(ccx: @crate_ctxt, it: @ast::item) {
23062260
let _icx = ccx.insn_ctxt("trans_constant");

trunk/src/librustc/middle/trans/callee.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,6 @@ fn trans_fn_ref_with_vtables(
223223
let must_monomorphise;
224224
if type_params.len() > 0 || opt_impl_did.is_some() {
225225
must_monomorphise = true;
226-
} else if ccx.tcx.automatically_derived_methods.contains_key(def_id) {
227-
must_monomorphise = false;
228226
} else if def_id.crate == ast::local_crate {
229227
let map_node = session::expect(
230228
ccx.sess,

0 commit comments

Comments
 (0)