]> git.lizzy.rs Git - rust.git/commit
Add a fast path in ty::occurs_check_fails
authorTim Chevalier <chevalier@alum.wellesley.edu>
Thu, 4 Aug 2011 22:56:40 +0000 (15:56 -0700)
committerTim Chevalier <chevalier@alum.wellesley.edu>
Thu, 4 Aug 2011 22:56:40 +0000 (15:56 -0700)
commit5f03ca48d8348197b52697f54a34e471b0edd79f
tree2c874cde285abe0feb8d7acb98331e61a7b9f842
parent2baaeab784a1f5c95deb8bd0c3a9745a969431cc
Add a fast path in ty::occurs_check_fails

Use type_contains_vars in occurs_check_fails to avoid doing
any work most of the time. This fixes a performance regression.
(No one else noticed yet that typechecking just got 4x slower, right?
Well, now it isn't anymore. :-})
src/comp/middle/ty.rs