Remove one use of span_bug_no_panic
.
It's unclear why this is used here. All entries in the third column of `UNICODE_ARRAY` are covered by `ASCII_ARRAY`, so if the lookup fails it's a genuine compiler bug. It was added way back in #29837, for no clear reason. This commit changes it to `span_bug`, which is more typical.
This commit is contained in:
parent
7bdb227567
commit
e3b7ecc1ef
@ -350,8 +350,7 @@ pub(super) fn check_for_substitution(
|
||||
|
||||
let Some((_, ascii_name, token)) = ASCII_ARRAY.iter().find(|&&(s, _, _)| s == ascii_str) else {
|
||||
let msg = format!("substitution character not found for '{ch}'");
|
||||
reader.sess.span_diagnostic.span_bug_no_panic(span, msg);
|
||||
return (None, None);
|
||||
reader.sess.span_diagnostic.span_bug(span, msg);
|
||||
};
|
||||
|
||||
// special help suggestion for "directed" double quotes
|
||||
|
Loading…
x
Reference in New Issue
Block a user