use `core::str::StrPrelude::as_ptr()` to simplify code, no longer use transmute. use `panic_fmt` instead of old `fail_fmt` lang item.
(compiled with the latest nightly rustc.)