Skip to content

Commit 61367e3

Browse files
committed
Fix prefixing of logging paths with crate name
1 parent a57c15b commit 61367e3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/comp/middle/trans/base.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3742,9 +3742,10 @@ fn trans_log(lvl: @ast::expr, cx: @block_ctxt, e: @ast::expr) -> @block_ctxt {
37423742
ret trans_expr(cx, lvl, ignore);
37433743
}
37443744

3745-
let modpath = vec::filter(cx.fcx.path, {|e|
3746-
alt e { path_mod(_) { true } _ { false } }
3747-
});
3745+
let modpath = [path_mod(ccx.link_meta.name)] +
3746+
vec::filter(cx.fcx.path, {|e|
3747+
alt e { path_mod(_) { true } _ { false } }
3748+
});
37483749
let modname = path_str(modpath);
37493750

37503751
let global = if ccx.module_data.contains_key(modname) {

0 commit comments

Comments
 (0)