Skip to content

"type ... too big for the current architecture" error reported without span pointing to type #25116

Open
@oli-obk

Description

@oli-obk

e053dfa added checks for huge types. These checks are done in middle/trans, but the location of the type is not reported.

For anonymous array types there's no way to extract the span, as the ast-ID is lost.

An example:

fn main() {
    let _x = [0; 9223372036854775808];
}

the error message:

error: the type `[i32; 9223372036854775808]` is too big for the current architecture

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.E-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.T-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