Skip to content

Commit a789b49

Browse files
author
hyd-dev
committed
Use Lrc instead of Rc in MiriCompilerCalls::config()
1 parent 453e3ef commit a789b49

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/bin/miri.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![feature(rustc_private, bool_to_option, stmt_expr_attributes)]
22

3+
extern crate rustc_data_structures;
34
extern crate rustc_driver;
45
extern crate rustc_errors;
56
extern crate rustc_hir;
@@ -12,12 +13,12 @@ use std::convert::TryFrom;
1213
use std::env;
1314
use std::num::NonZeroU64;
1415
use std::path::PathBuf;
15-
use std::rc::Rc;
1616
use std::str::FromStr;
1717

1818
use hex::FromHexError;
1919
use log::debug;
2020

21+
use rustc_data_structures::sync::Lrc;
2122
use rustc_driver::Compilation;
2223
use rustc_errors::emitter::{ColorConfig, HumanReadableErrorType};
2324
use rustc_hir::{self as hir, def_id::LOCAL_CRATE, Node};
@@ -42,7 +43,7 @@ impl rustc_driver::Callbacks for MiriCompilerCalls {
4243
// HACK: rustc will emit "crate ... required to be available in rlib format, but
4344
// was not found in this form" errors once we use `tcx.dependency_formats()` if
4445
// there's no rlib provided, so setting a dummy path here to workaround those errors.
45-
Rc::make_mut(&mut crate_source).rlib = Some((PathBuf::new(), PathKind::All));
46+
Lrc::make_mut(&mut crate_source).rlib = Some((PathBuf::new(), PathKind::All));
4647
crate_source
4748
};
4849
});

0 commit comments

Comments
 (0)