Skip to content

Better diagnostics for : instead of -> in return type #77115

Closed
@LeSeulArtichaut

Description

@LeSeulArtichaut

Follow-up to #77019

Originally posted by @bugaevc in #77035 (comment):

Would also be cool to emit this upon encountering

fn foo(_arg: i32): i32 {
    ...
}

which is how you'd define the return type in Scala and Kotlin.

Metadata

Metadata

Labels

A-diagnosticsArea: Messages for errors, warnings, and lintsA-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`C-enhancementCategory: An issue proposing an enhancement or a PR with one.D-confusingDiagnostics: Confusing error or lint that should be reworked.D-newcomer-roadblockDiagnostics: Confusing error or lint; hard to understand for new users.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions