You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
extern mod std;
fn main() {
let x = std::map::HashMap();
x.insert((@"abc", 0), 0);
}
rustc produces:
rustc: /home/gareth/projects/rust/src/llvm/lib/VMCore/Instructions.cpp:1062: void llvm::StoreInst::AssertOK(): Assertion `getOperand(0)->getType() == cast<PointerType>(getOperand(1)->getType())->getElementType() && "Ptr must be a pointer to Val type!"' failed.
Aborted (core dumped)
The text was updated successfully, but these errors were encountered:
This is due to the code committed in rntz@d718bc2, specifically the pattern match let &(ref a, ref b) = &self;. I'll go write up a workaround that avoids this pattern so that you can use HashMap<(@str,T),T> etc., but the real bug is in the compiler.
Given this code:
rustc produces:
The text was updated successfully, but these errors were encountered: