Skip to content

Commit 8d7d82f

Browse files
committed
---
yaml --- r: 172199 b: refs/heads/beta c: cf136cd h: refs/heads/master i: 172197: 42dfc9e 172195: 208e6c1 172191: cb80889 v: v3
1 parent 3e9df41 commit 8d7d82f

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
3232
refs/heads/batch: b5571ed71a5879c0495a982506258d5d267744ed
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
34-
refs/heads/beta: bdc1bfd8f1740461d2ee39ba41f5245ed8913a2a
34+
refs/heads/beta: cf136cd3507a5e929cff8d03179c0f6d96bdb687
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928

branches/beta/src/librustc_trans/trans/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ pub fn fulfill_obligation<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
992992
let tcx = ccx.tcx();
993993

994994
// Remove any references to regions; this helps improve caching.
995-
let trait_ref = ty_fold::erase_regions(tcx, trait_ref);
995+
let trait_ref = erase_regions(tcx, &trait_ref);
996996

997997
// First check the cache.
998998
match ccx.trait_cache().borrow().get(&trait_ref) {

branches/beta/src/librustc_trans/trans/monomorphize.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,10 @@ pub fn normalize_associated_type<'tcx,T>(tcx: &ty::ctxt<'tcx>, value: &T) -> T
315315
{
316316
debug!("normalize_associated_type(t={})", value.repr(tcx));
317317

318+
let value = erase_regions(tcx, value);
319+
318320
if !value.has_projection_types() {
319-
return value.clone();
321+
return value;
320322
}
321323

322324
// FIXME(#20304) -- cache
@@ -326,7 +328,7 @@ pub fn normalize_associated_type<'tcx,T>(tcx: &ty::ctxt<'tcx>, value: &T) -> T
326328
let mut selcx = traits::SelectionContext::new(&infcx, &typer);
327329
let cause = traits::ObligationCause::dummy();
328330
let traits::Normalized { value: result, obligations } =
329-
traits::normalize(&mut selcx, cause, value);
331+
traits::normalize(&mut selcx, cause, &value);
330332

331333
debug!("normalize_associated_type: result={} obligations={}",
332334
result.repr(tcx),

0 commit comments

Comments
 (0)