Replaced all fail! macros with panic! macros

For compatibility with https://github.com/rust-lang/rust/pull/17894