Revise error for single-quote interpolation

This commit is contained in:
Richard Feldman 2024-02-27 12:11:54 -05:00
parent 2c64718ef6
commit 878042bc3d
No known key found for this signature in database
GPG Key ID: F1F21AA5B1D9E43B

View File

@ -1098,9 +1098,9 @@ fn to_str_report<'a>(
ESingleQuote::InterpolationNotAllowed => {
alloc.stack([
alloc.concat([
alloc.reflow("I am part way through parsing this scalar literal (character literal), "),
alloc.reflow("but I encountered a string interpolation like \"$(this)\", which is not "),
alloc.reflow("allowed in scalar literals."),
alloc.reflow("I am part way through parsing this single-quote literal, "),
alloc.reflow("but I encountered a string interpolation like \"$(this)\","),
alloc.reflow("which is not allowed in single-quote literals."),
]),
alloc.region_with_subregion(lines.convert_region(surroundings), region),
alloc.concat([