mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 16:54:01 +00:00
trans::context: Remove some tcx::tls wackiness
This commit is contained in:
parent
86a691a5c7
commit
00eabcbefa
@ -183,10 +183,7 @@ impl<'tcx> DepTrackingMapConfig for TraitSelectionCache<'tcx> {
|
|||||||
type Key = ty::PolyTraitRef<'tcx>;
|
type Key = ty::PolyTraitRef<'tcx>;
|
||||||
type Value = traits::Vtable<'tcx, ()>;
|
type Value = traits::Vtable<'tcx, ()>;
|
||||||
fn to_dep_node(key: &ty::PolyTraitRef<'tcx>) -> DepNode<DefId> {
|
fn to_dep_node(key: &ty::PolyTraitRef<'tcx>) -> DepNode<DefId> {
|
||||||
ty::tls::with(|tcx| {
|
key.to_poly_trait_predicate().dep_node()
|
||||||
let lifted_key = tcx.lift(key).unwrap();
|
|
||||||
lifted_key.to_poly_trait_predicate().dep_node()
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user