Skip to content

Strange error message #34359

Closed
Closed
@GuillaumeGomez

Description

@GuillaumeGomez

The following code:

fn main() {
    for _ in 0 .. 2 {
        break();
    }
}

Returns the following error (on all rustc versions):

error: the type of this value must be known in this context

Which is really strange. The same error occurs with "continue();".

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions