Closed
Description
The following code causes
Assertion failed: (getOperand(0)->getType() == cast<PointerType>(getOperand(1)->getType())->getElementType() && "Ptr must be a pointer to Val type!"), function AssertOK, file /Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/src/llvm/lib/IR/Instructions.cpp, line 1083.
use std::collections::HashMap;
use std::path::{Path, PathBuf};
#[derive(Debug)]
pub struct FileMeta;
struct S {
h2 : HashMap<PathBuf, FileMeta>,
}
impl S {
fn new() -> S {
S {
h2: HashMap::new(),
}
}
fn f(&self, path: &Path) -> FileMeta {
let m = FileMeta;
match self.h2.get(path) {
Some(meta) => m,
None => m
}
}
}
Using rustc 1.0.0-nightly (12b846ab8 2015-03-09) (built 2015-03-09)
.