Skip to content

WF check has error code E0277 which doesn't say anything about the current error #135599

@oriongonza

Description

@oriongonza

Code

struct Unsized {
    inner2: [u8],
    inner3: [u8],
}

Current output

error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
[...]

Desired output

error: the size for values of type `[u8]` cannot be known at compilation time
[...]

(Don't mention E0277)

Rationale and extra context

When you read up on this error it goes on about whether I'm not implementing a trait. Nothing there talks about Sized, or why we're not implmenting it.

The current output error is very good, but that part is a bit misleading.

Other cases

Rust Version

cargo 1.86.0-nightly (fd784878c 2025-01-03)

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