Replace fail! with panic!
Upgrade code to the latest Rust compiler (fix scoped enum, renamed methods, unwrap optional,...).
Fix some warnings (deprecated methods or idioms.)
Upgrade test code to the latest Rust compiler. All tests passed.