]> git.lizzy.rs Git - rust.git/commitdiff
Use `Lrc` instead of `Rc` in `MiriCompilerCalls::config()`
authorhyd-dev <yd-huang@outlook.com>
Fri, 30 Jul 2021 13:28:34 +0000 (21:28 +0800)
committerhyd-dev <yd-huang@outlook.com>
Fri, 30 Jul 2021 13:28:34 +0000 (21:28 +0800)
src/bin/miri.rs

index 5a8f07263f35b707b1730e6b6d61a7f4dc4884ce..18c393815ca5e9422fe0428e519eef710afa828c 100644 (file)
@@ -1,5 +1,6 @@
 #![feature(rustc_private, bool_to_option, stmt_expr_attributes)]
 
+extern crate rustc_data_structures;
 extern crate rustc_driver;
 extern crate rustc_errors;
 extern crate rustc_hir;
 use std::env;
 use std::num::NonZeroU64;
 use std::path::PathBuf;
-use std::rc::Rc;
 use std::str::FromStr;
 
 use hex::FromHexError;
 use log::debug;
 
+use rustc_data_structures::sync::Lrc;
 use rustc_driver::Compilation;
 use rustc_errors::emitter::{ColorConfig, HumanReadableErrorType};
 use rustc_hir::{self as hir, def_id::LOCAL_CRATE, Node};
@@ -42,7 +43,7 @@ fn config(&mut self, config: &mut Config) {
                 // HACK: rustc will emit "crate ... required to be available in rlib format, but
                 // was not found in this form" errors once we use `tcx.dependency_formats()` if
                 // there's no rlib provided, so setting a dummy path here to workaround those errors.
-                Rc::make_mut(&mut crate_source).rlib = Some((PathBuf::new(), PathKind::All));
+                Lrc::make_mut(&mut crate_source).rlib = Some((PathBuf::new(), PathKind::All));
                 crate_source
             };
         });