Fix prefixing of logging paths with crate name

This commit is contained in:
Marijn Haverbeke 2012-02-03 22:11:45 +01:00
parent a57c15bf88
commit 61367e3c27

View file

@ -3742,9 +3742,10 @@ fn trans_log(lvl: @ast::expr, cx: @block_ctxt, e: @ast::expr) -> @block_ctxt {
ret trans_expr(cx, lvl, ignore); ret trans_expr(cx, lvl, ignore);
} }
let modpath = vec::filter(cx.fcx.path, {|e| let modpath = [path_mod(ccx.link_meta.name)] +
alt e { path_mod(_) { true } _ { false } } vec::filter(cx.fcx.path, {|e|
}); alt e { path_mod(_) { true } _ { false } }
});
let modname = path_str(modpath); let modname = path_str(modpath);
let global = if ccx.module_data.contains_key(modname) { let global = if ccx.module_data.contains_key(modname) {