Skip to content

Don't show dead code warnings for functions local to dead code #11429

@jorgeadriano

Description

@jorgeadriano

At the moment the following code triggers dead code warnings for both f and g. The latter is unnecessary.

fn f(){
   fn g(){};
   g();
}

rust version 0.9

Activity

alexcrichton

alexcrichton commented on Jan 10, 2014

@alexcrichton
Member

Closing as a dupe of #11380, but thanks for the bug report!

The duplicate issue raises the same concerns of warning about dead code too much because you only care about the "roots" of the dead code.

jorgeadriano

jorgeadriano commented on Jan 10, 2014

@jorgeadriano
Author

I did look at that one, but was not sure if it is the same issue.
Thanks for the quick reply.

added a commit that references this issue on Nov 2, 2023
9f5de66
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @alexcrichton@jorgeadriano

        Issue actions

          Don't show dead code warnings for functions local to dead code · Issue #11429 · rust-lang/rust