Closed
Description
Seems like fat ptrs aren't handled properly in mir::constant::trans_constval
:
#![feature(rustc_attrs)]
#[rustc_mir]
fn test() -> &'static str {
"sad"
}
fn main() {}
rustc: /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/llvm/lib/IR/Constants.cpp:1649: static llvm::Constant* llvm::ConstantExpr::getPointerCast(llvm::Constant*, llvm::Type*): Assertion `S->getType()->isPtrOrPtrVectorTy() && "Invalid cast"' failed.
Aborted (core dumped)