trans::context: Remove some tcx::tls wackiness

This commit is contained in:
Michael Woerister 2016-05-06 17:09:18 -04:00
parent 86a691a5c7
commit 00eabcbefa

View File

@ -183,10 +183,7 @@ impl<'tcx> DepTrackingMapConfig for TraitSelectionCache<'tcx> {
type Key = ty::PolyTraitRef<'tcx>;
type Value = traits::Vtable<'tcx, ()>;
fn to_dep_node(key: &ty::PolyTraitRef<'tcx>) -> DepNode<DefId> {
ty::tls::with(|tcx| {
let lifted_key = tcx.lift(key).unwrap();
lifted_key.to_poly_trait_predicate().dep_node()
})
key.to_poly_trait_predicate().dep_node()
}
}