We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
TypeNames::type_names
1 parent ddf3c6d commit d2bcd14Copy full SHA for d2bcd14
src/librustc/lib/llvm.rs
@@ -1804,20 +1804,17 @@ pub fn SetFunctionAttribute(Fn: ValueRef, attr: Attribute) {
1804
/* Memory-managed object interface to type handles. */
1805
1806
pub struct TypeNames {
1807
- type_names: HashMap<TypeRef, ~str>,
1808
named_types: HashMap<~str, TypeRef>
1809
}
1810
1811
impl TypeNames {
1812
pub fn new() -> TypeNames {
1813
TypeNames {
1814
- type_names: HashMap::new(),
1815
named_types: HashMap::new()
1816
1817
1818
1819
pub fn associate_type(&mut self, s: &str, t: &Type) {
1820
- assert!(self.type_names.insert(t.to_ref(), s.to_owned()));
1821
assert!(self.named_types.insert(s.to_owned(), t.to_ref()));
1822
1823
0 commit comments