]> git.lizzy.rs Git - rust.git/commit
Change typestate to use visit instead of walk
authorTim Chevalier <chevalier@alum.wellesley.edu>
Tue, 12 Jul 2011 18:22:31 +0000 (11:22 -0700)
committerTim Chevalier <chevalier@alum.wellesley.edu>
Tue, 12 Jul 2011 18:22:31 +0000 (11:22 -0700)
commit21b94d57d5319e42f5a30818c88b95c95449864e
treef73171cd2a62b49a9052416bf7c711f9ca8a66fc
parent0e594939aa032c074df925d03c7d1289d6c2efc2
Change typestate to use visit instead of walk

Typestate was failing to check some code because if it saw an item,
it would quit immediately. This was to avoid checking nested items
in the same context as the lexically enclosing item, but it was
having the wrong effect: not checking the code after the item at all.

Fixed by switching to visit and skipping over items in a proper
nested fashion. Closes #668.
src/test/compile-fail/uninit-after-item.rs [new file with mode: 0644]