Auto merge of #58691 - Centril:rollup, r=Centril
Rollup of 6 pull requests Successful merges: - #57364 (Improve parsing diagnostic for negative supertrait bounds) - #58183 (Clarify guarantees for `Box` allocation) - #58442 (Simplify the unix `Weak` functionality) - #58454 (Refactor Windows stdio and remove stdin double buffering ) - #58511 (Const to op simplification) - #58642 (rustdoc: support methods on primitives in intra-doc links) Failed merges: r? @ghost
This commit is contained in:
commit
e17c48e2f2
32 changed files with 584 additions and 399 deletions
|
|
@ -71,7 +71,7 @@ pub fn codegen_static_initializer(
|
|||
let static_ = cx.tcx.const_eval(param_env.and(cid))?;
|
||||
|
||||
let alloc = match static_.val {
|
||||
ConstValue::ByRef(_, alloc, n) if n.bytes() == 0 => alloc,
|
||||
ConstValue::ByRef(ptr, alloc) if ptr.offset.bytes() == 0 => alloc,
|
||||
_ => bug!("static const eval returned {:#?}", static_),
|
||||
};
|
||||
Ok((const_alloc_to_llvm(cx, alloc), alloc))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue