ICE when iterating over string literal with manual newline insertions #59954
Labels
C-bug
Category: This is a bug.
E-needs-mcve
Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The error message by the compiler was,
thread 'rustc' panicked at 'index out of bounds: the len is 73 but the index is 74', /rustc/91856ed52c58aa5ba66a015354d1cc69e9779bdf/src/libcore/slice/mod.rs:2539:10
.The code:
Changing the
contents
string literal to be formatted in the conventional way, i.e. without the manually inserted newline characters makes the code compile again (see below).Meta
The complete error message
The backtrace:
The text was updated successfully, but these errors were encountered: