P0037

String.repeat would build a text over 256 MiB, so the interpreter panics instead of running out of memory. Spans the call.

Machine-applicable fix: none.

Example

This program fails with P0037.

fn main() {
    let huge = "ab".repeat(300000000)
}

Fixed

The same program, fixed.

fn main() {
    let small = "ab".repeat(3000)
}

Listed in the runtime notes. oskac explain P0037 prints this entry offline.

All error codes