updated for latest rust nightly. some overly verbose cruft, but all tests pass