This code (as reported in [this SO question](http://stackoverflow.com/questions/27634458/cast-type-to-mut)): ``` rust 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. ```