long line police
This commit is contained in:
parent
14d721388b
commit
bcaeb20800
@ -358,14 +358,14 @@ priv impl &preserve_ctxt {
|
||||
debug!("Elected to root");
|
||||
let rk = {id: base.id, derefs: derefs};
|
||||
// This code could potentially lead cause boxes to be frozen
|
||||
// for longer than necessarily at runtime. It prevents an ICE
|
||||
// in trans; the fundamental problem is that it's hard to make
|
||||
// sure trans and borrowck have the same notion of scope. The
|
||||
// real fix is to clean up how trans handles cleanups, but
|
||||
// that's hard. If this becomes an issue, it's an option to just
|
||||
// change this to `let scope_to_use = scope_id;`. Though that
|
||||
// would potentially re-introduce the ICE. See #3511 for more
|
||||
// details.
|
||||
// for longer than necessarily at runtime. It prevents an
|
||||
// ICE in trans; the fundamental problem is that it's hard
|
||||
// to make sure trans and borrowck have the same notion of
|
||||
// scope. The real fix is to clean up how trans handles
|
||||
// cleanups, but that's hard. If this becomes an issue, it's
|
||||
// an option to just change this to `let scope_to_use =
|
||||
// scope_id;`. Though that would potentially re-introduce
|
||||
// the ICE. See #3511 for more details.
|
||||
let scope_to_use = if
|
||||
self.bccx.stmt_map.contains_key(scope_id) {
|
||||
// Root it in its parent scope, b/c
|
||||
|
@ -405,7 +405,8 @@ fn const_expr(cx: @crate_ctxt, e: @ast::expr) -> ValueRef {
|
||||
assert ast_util::is_local(def_id);
|
||||
let f = base::get_item_val(cx, def_id.node);
|
||||
match purity {
|
||||
ast::extern_fn => llvm::LLVMConstPointerCast(f, T_ptr(T_i8())),
|
||||
ast::extern_fn =>
|
||||
llvm::LLVMConstPointerCast(f, T_ptr(T_i8())),
|
||||
_ => C_struct(~[f, C_null(T_opaque_box_ptr(cx))])
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user