Skip to content

Commit 993b40a

Browse files
committed
---
yaml --- r: 40767 b: refs/heads/dist-snap c: a7159be h: refs/heads/master i: 40765: 889b23f 40763: 51622bc 40759: 9a2fd60 40751: 76339b0 40735: 8926fb8 40703: 0e49dc7 v: v3
1 parent c031f8b commit 993b40a

17 files changed

+18
-1303
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278
99
refs/heads/incoming: e90142e536c150df0d9b4b2f11352152177509b5
10-
refs/heads/dist-snap: 6439f2d54645915ce57f4c229811719e8e498151
10+
refs/heads/dist-snap: a7159be24a9c81517a46e09c7ff62cadc72759b6
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/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");

branches/dist-snap/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)