]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_codegen_utils/codegen_backend.rs
Auto merge of #67303 - dtolnay:rls, r=Xanewok
[rust.git] / src / librustc_codegen_utils / codegen_backend.rs
index 262cfb1658ef99c79f07a1de6ab4d114189bcd08..0737fd6b5ca2315646b2f2d3a81fbd6da7f8ffcd 100644 (file)
@@ -7,28 +7,28 @@
 #![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
 
 use std::any::Any;
-use std::sync::mpsc;
 
-use syntax::symbol::Symbol;
-use rustc::session::Session;
-use rustc::util::common::ErrorReported;
+use rustc::dep_graph::DepGraph;
+use rustc::middle::cstore::{EncodedMetadata, MetadataLoaderDyn};
 use rustc::session::config::{OutputFilenames, PrintRequest};
-use rustc::ty::TyCtxt;
+use rustc::session::Session;
 use rustc::ty::query::Providers;
-use rustc::middle::cstore::{EncodedMetadata, MetadataLoader};
-use rustc::dep_graph::DepGraph;
+use rustc::ty::TyCtxt;
+use rustc::util::common::ErrorReported;
+use syntax::symbol::Symbol;
 
 pub use rustc_data_structures::sync::MetadataRef;
 
 pub trait CodegenBackend {
     fn init(&self, _sess: &Session) {}
     fn print(&self, _req: PrintRequest, _sess: &Session) {}
-    fn target_features(&self, _sess: &Session) -> Vec<Symbol> { vec![] }
+    fn target_features(&self, _sess: &Session) -> Vec<Symbol> {
+        vec![]
+    }
     fn print_passes(&self) {}
     fn print_version(&self) {}
-    fn diagnostics(&self) -> &[(&'static str, &'static str)] { &[] }
 
-    fn metadata_loader(&self) -> Box<dyn MetadataLoader + Sync>;
+    fn metadata_loader(&self) -> Box<MetadataLoaderDyn>;
     fn provide(&self, _providers: &mut Providers<'_>);
     fn provide_extern(&self, _providers: &mut Providers<'_>);
     fn codegen_crate<'tcx>(
@@ -36,7 +36,6 @@ fn codegen_crate<'tcx>(
         tcx: TyCtxt<'tcx>,
         metadata: EncodedMetadata,
         need_metadata_module: bool,
-        rx: mpsc::Receiver<Box<dyn Any + Send>>,
     ) -> Box<dyn Any>;
 
     /// This is called on the returned `Box<dyn Any>` from `codegen_backend`