about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc_driver/lib.rs4
-rw-r--r--src/libsyntax/codemap.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs
index 04513bfa53d..36dda8793a1 100644
--- a/src/librustc_driver/lib.rs
+++ b/src/librustc_driver/lib.rs
@@ -444,7 +444,7 @@ fn get_trans_sysroot(backend_name: &str) -> fn() -> Box<TransCrate> {
 // The FileLoader provides a way to load files from sources other than the file system.
 pub fn run_compiler<'a>(args: &[String],
                         callbacks: &mut CompilerCalls<'a>,
-                        file_loader: Option<Box<FileLoader + 'static>>,
+                        file_loader: Option<Box<FileLoader + Send + Sync + 'static>>,
                         emitter_dest: Option<Box<Write + Send>>)
                         -> (CompileResult, Option<Session>)
 {
@@ -455,7 +455,7 @@ pub fn run_compiler<'a>(args: &[String],
 
 fn run_compiler_impl<'a>(args: &[String],
                          callbacks: &mut CompilerCalls<'a>,
-                         file_loader: Option<Box<FileLoader + 'static>>,
+                         file_loader: Option<Box<FileLoader + Send + Sync + 'static>>,
                          emitter_dest: Option<Box<Write + Send>>)
                          -> (CompileResult, Option<Session>)
 {
diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs
index c340f1b8c8a..6a5a180fc0a 100644
--- a/src/libsyntax/codemap.rs
+++ b/src/libsyntax/codemap.rs
@@ -127,7 +127,7 @@ impl StableFilemapId {
 
 pub struct CodeMap {
     pub(super) files: RefCell<Vec<Lrc<FileMap>>>,
-    file_loader: Box<FileLoader>,
+    file_loader: Box<FileLoader + Sync + Send>,
     // This is used to apply the file path remapping as specified via
     // --remap-path-prefix to all FileMaps allocated within this CodeMap.
     path_mapping: FilePathMapping,
@@ -157,7 +157,7 @@ impl CodeMap {
 
     }
 
-    pub fn with_file_loader(file_loader: Box<FileLoader>,
+    pub fn with_file_loader(file_loader: Box<FileLoader + Sync + Send>,
                             path_mapping: FilePathMapping)
                             -> CodeMap {
         CodeMap {