about summary refs log tree commit diff
path: root/compiler/rustc_span/src/source_map.rs
diff options
context:
space:
mode:
authorSparrowLii <liyuan179@huawei.com>2023-03-03 10:14:57 +0800
committerSparrowLii <liyuan179@huawei.com>2023-05-06 09:34:18 +0800
commitb9746ce03901fc39707c8c2d0405caf5384b4e97 (patch)
tree64ccb0f53279ed73da3b25f09d55029c9ae81323 /compiler/rustc_span/src/source_map.rs
parent963e5c0eff171160238dc2a2c0ba7a1912fada67 (diff)
downloadrust-b9746ce03901fc39707c8c2d0405caf5384b4e97.tar.gz
rust-b9746ce03901fc39707c8c2d0405caf5384b4e97.zip
introduce `DynSend` and `DynSync` auto trait
Diffstat (limited to 'compiler/rustc_span/src/source_map.rs')
-rw-r--r--compiler/rustc_span/src/source_map.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_span/src/source_map.rs b/compiler/rustc_span/src/source_map.rs
index 1294a8b8e6b..e0a2733a464 100644
--- a/compiler/rustc_span/src/source_map.rs
+++ b/compiler/rustc_span/src/source_map.rs
@@ -14,7 +14,7 @@ pub use crate::*;
 
 use rustc_data_structures::fx::FxHashMap;
 use rustc_data_structures::stable_hasher::{Hash128, Hash64, StableHasher};
-use rustc_data_structures::sync::{AtomicU32, Lrc, MappedReadGuard, ReadGuard, RwLock};
+use rustc_data_structures::sync::{AtomicU32, IntoDyn, Lrc, MappedReadGuard, ReadGuard, RwLock};
 use std::cmp;
 use std::hash::Hash;
 use std::path::{self, Path, PathBuf};
@@ -176,7 +176,7 @@ pub struct SourceMap {
     used_address_space: AtomicU32,
 
     files: RwLock<SourceMapFiles>,
-    file_loader: Box<dyn FileLoader + Sync + Send>,
+    file_loader: IntoDyn<Box<dyn FileLoader + Sync + Send>>,
     // This is used to apply the file path remapping as specified via
     // `--remap-path-prefix` to all `SourceFile`s allocated within this `SourceMap`.
     path_mapping: FilePathMapping,
@@ -202,7 +202,7 @@ impl SourceMap {
         SourceMap {
             used_address_space: AtomicU32::new(0),
             files: Default::default(),
-            file_loader,
+            file_loader: IntoDyn(file_loader),
             path_mapping,
             hash_kind,
         }