Fix an LLVM assertion when matching against static strings

Fixes #8315
Fixes #11940
Remove a redundant bitcast from fail!() handling
auto merge of #14752 : jakub-/rust/issue-11940, r=alexcrichton

Fixes #8315
Fixes #11940