Closed
Description
This code (as reported in this SO question):
fn foo(t: &mut int){
println!("{}", t);
}
fn main() {
let test = 10;
let h = move || {
let mut r = &mut test.clone();
foo(r);
};
h();
}
causes an assertion failure in LLVM code:
Assertion failed: (S->getType()->isPtrOrPtrVectorTy() && "Invalid cast"), function CreatePointerCast, file /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/llvm/lib/IR/Instructions.cpp, line 2522.
Metadata
Metadata
Assignees
Labels
No labels