about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-02-12 17:32:29 -0800
committerbors <bors@rust-lang.org>2013-02-12 17:32:29 -0800
commit1a394e57f7a622e67c13eae8bc26848eea31334a (patch)
tree8fcc9a4bab34ec3f7ceb4c357976178efc43bd38
parent6727c6fb569afec52b87052b99f066b8f49827c4 (diff)
parenta165f882726d86ad4c65a5b72daa5b457af12e6c (diff)
auto merge of #4896 : pcwalton/rust/move-speedup, r=pcwalton
r? @nikomatsakis 

When you made the change to fix kinds in recursion, you stopped looking in the master cache. This patch fixes it.
-rw-r--r--src/librustc/middle/ty.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs
index 4350c62af6f..6ba3aa505e0 100644
--- a/src/librustc/middle/ty.rs
+++ b/src/librustc/middle/ty.rs
@@ -1932,6 +1932,10 @@ pub fn type_contents(cx: ctxt, ty: t) -> TypeContents {
             Some(tc) => { return *tc; }
             None => {}
         }
+        match cx.tc_cache.find(&ty_id) {    // Must check both caches!
+            Some(tc) => { return *tc; }
+            None => {}
+        }
         cache.insert(ty_id, TC_NONE);
 
         debug!("computing contents of %s", ty_to_str(cx, ty));