Skip to content

Medium Array of Vecs cloned causes stack overflow but doesn't provide any details #111733

Open
@teken

Description

@teken

Code

fn main() {
    const EMPTY: Vec<u32> = vec![];
    let mut grid: [Vec<u32>; 2500] = [EMPTY; 2500];

    let grid_clone = grid.clone();
}

Current output

thread 'main' has overflowed its stack
error: process didn't exit successfully: `target\debug\t.exe` (exit code: 0xc00000fd, STATUS_STACK_OVERFLOW)

Desired output

thread 'main' has overflowed its stack
stack overflow caused by clone() on line 5
error: process didn't exit successfully: `target\debug\t.exe` (exit code: 0xc00000fd, STATUS_STACK_OVERFLOW)

Rationale and extra context

No response

Other cases

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions