Skip to content

Commit 7efbad6

Browse files
committed
Don't confuse backwards and forwards.
Oops. If we already have a backwarding vtable, that means that we are currently building a forwarding fn. (Progress toward issue #702.)
1 parent 6423cc7 commit 7efbad6

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/comp/middle/trans.rs

+7-3
Original file line numberDiff line numberDiff line change
@@ -6524,10 +6524,14 @@ fn process_fwding_mthd(cx: @local_ctxt, sp: &span, m: @ty::method,
65246524
let mcx: @local_ctxt = @{path: cx.path + ~["method", m.ident] with *cx};
65256525

65266526
// Make up a name for the forwarding function.
6527-
let fn_name: str;
6527+
let fn_name: str = "";
65286528
alt (backwarding_vtbl) {
6529-
none. { fn_name = "forwarding_fn"; }
6530-
some(_) { fn_name = "backwarding_fn"; }
6529+
// NB: If we have a backwarding_vtbl, that *doesn't* mean that we're
6530+
// currently processing a backwarding fn. It's the opposite: it means
6531+
// that we have already processed them, and now we're creating
6532+
// forwarding fns that *use* a vtable full of them.
6533+
none. { fn_name = "backwarding_fn"; }
6534+
some(_) { fn_name = "forwarding_fn"; }
65316535
}
65326536

65336537
let s: str = mangle_internal_name_by_path_and_seq(mcx.ccx, mcx.path,

0 commit comments

Comments
 (0)