Skip to content

Commit eb78ed1

Browse files
committed
---
yaml --- r: 169697 b: refs/heads/master c: cf136cd h: refs/heads/master i: 169695: 6610045 v: v3
1 parent bbd196c commit eb78ed1

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
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: bdc1bfd8f1740461d2ee39ba41f5245ed8913a2a
2+
refs/heads/master: cf136cd3507a5e929cff8d03179c0f6d96bdb687
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 5b3cd3900ceda838f5798c30ab96ceb41f962534
55
refs/heads/try: 5204084bd2e46af7cc6e0147430e44dd0d657bbb

trunk/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) {

trunk/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)