Fix ICE with static DST coercion

Closes #16911
Prevent failure when using fail! with invalid utf8.

Closes #16877.
auto merge of #16934 : nick29581/rust/dst-bug-6, r=pcwalton

Closes #16911 

r?
auto merge of #16940 : treeman/rust/fail-non-utf8, r=pnkfelix

Closes #16877.