]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_trans/back/link.rs
Rollup merge of #41249 - GuillaumeGomez:rustdoc-render, r=steveklabnik,frewsxcv
[rust.git] / src / librustc_trans / back / link.rs
index 66380079a8b29038538e18324455f68bce83deb4..7468f4ace1b16d760d811f728bd94caafa444925 100644 (file)
@@ -47,7 +47,6 @@
 use flate;
 use syntax::ast;
 use syntax::attr;
-use syntax::symbol::Symbol;
 use syntax_pos::Span;
 
 /// The LLVM module name containing crate-metadata. This includes a `.` on
@@ -136,11 +135,8 @@ pub fn find_crate_name(sess: Option<&Session>,
     "rust_out".to_string()
 }
 
-pub fn build_link_meta(incremental_hashes_map: &IncrementalHashesMap,
-                       name: &str)
-                       -> LinkMeta {
+pub fn build_link_meta(incremental_hashes_map: &IncrementalHashesMap) -> LinkMeta {
     let r = LinkMeta {
-        crate_name: Symbol::intern(name),
         crate_hash: Svh::new(incremental_hashes_map[&DepNode::Krate].to_smaller_hash()),
     };
     info!("{:?}", r);
@@ -443,7 +439,10 @@ fn archive_config<'a>(sess: &'a Session,
 }
 
 fn emit_metadata<'a>(sess: &'a Session, trans: &CrateTranslation, out_filename: &Path) {
-    let result = fs::File::create(out_filename).and_then(|mut f| f.write_all(&trans.metadata));
+    let result = fs::File::create(out_filename).and_then(|mut f| {
+        f.write_all(&trans.metadata.raw_data)
+    });
+
     if let Err(e) = result {
         sess.fatal(&format!("failed to write {}: {}", out_filename.display(), e));
     }