Changed fail macro to panic (compatibility with rust-lang/rust#17894)