Skip to content

Add warning when return is used #594

@jdm

Description

@jdm
Contributor

I frequently type return instead of ret, and always end up puzzling over the resulting error for longer than should be necessary. An explicit warning would be nice.

Activity

pcwalton

pcwalton commented on Jun 29, 2011

@pcwalton
Contributor

At the risk of bikeshedding, maybe we could just make return do the right thing?

graydon

graydon commented on Feb 14, 2012

@graydon
Contributor

Closing as wontfix. We don't detect keywords outside out own keyword set.

added a commit that references this issue on Dec 12, 2017
added a commit that references this issue on Oct 26, 2020
137bfd0
added a commit that references this issue on Jan 13, 2025
59a81c2
added a commit that references this issue on Jun 3, 2025
0b4ddb1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-frontendArea: Compiler frontend (errors, parsing and HIR)E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @graydon@jdm@pcwalton

        Issue actions

          Add warning when return is used · Issue #594 · rust-lang/rust