use std::cell::RefCell;
use std::fmt;
use std::rc::Rc;
+use rustc_data_structures::sync::Lrc;
use std::hash::{Hash, Hasher};
use syntax::ast;
use syntax_pos::{MultiSpan, Span};
}
fn borrowck<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, owner_def_id: DefId)
- -> Rc<BorrowCheckResult>
+ -> Lrc<BorrowCheckResult>
{
debug!("borrowck(body_owner_def_id={:?})", owner_def_id);
// those things (notably the synthesized constructors from
// tuple structs/variants) do not have an associated body
// and do not need borrowchecking.
- return Rc::new(BorrowCheckResult {
+ return Lrc::new(BorrowCheckResult {
used_mut_nodes: FxHashSet(),
})
}
}
unused::check(&mut bccx, body);
- Rc::new(BorrowCheckResult {
+ Lrc::new(BorrowCheckResult {
used_mut_nodes: bccx.used_mut_nodes.into_inner(),
})
}
// Some in `borrowck_fn` and cleared later
tables: &'a ty::TypeckTables<'tcx>,
- region_scope_tree: Rc<region::ScopeTree>,
+ region_scope_tree: Lrc<region::ScopeTree>,
owner_def_id: DefId,