mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Make Session.code_stats thread-safe
This commit is contained in:
parent
904e2b6b35
commit
b0c7bdaa97
@ -139,7 +139,7 @@ pub struct Session {
|
|||||||
pub perf_stats: PerfStats,
|
pub perf_stats: PerfStats,
|
||||||
|
|
||||||
/// Data about code being compiled, gathered during compilation.
|
/// Data about code being compiled, gathered during compilation.
|
||||||
pub code_stats: RefCell<CodeStats>,
|
pub code_stats: Lock<CodeStats>,
|
||||||
|
|
||||||
next_node_id: Cell<ast::NodeId>,
|
next_node_id: Cell<ast::NodeId>,
|
||||||
|
|
||||||
@ -1122,7 +1122,7 @@ pub fn build_session_(
|
|||||||
normalize_ty_after_erasing_regions: AtomicUsize::new(0),
|
normalize_ty_after_erasing_regions: AtomicUsize::new(0),
|
||||||
normalize_projection_ty: AtomicUsize::new(0),
|
normalize_projection_ty: AtomicUsize::new(0),
|
||||||
},
|
},
|
||||||
code_stats: RefCell::new(CodeStats::new()),
|
code_stats: Lock::new(CodeStats::new()),
|
||||||
optimization_fuel_crate,
|
optimization_fuel_crate,
|
||||||
optimization_fuel_limit,
|
optimization_fuel_limit,
|
||||||
print_fuel_crate,
|
print_fuel_crate,
|
||||||
|
Loading…
Reference in New Issue
Block a user