Skip to content

#[deprecated] does not work for in-crate usages of items #16409

Description

@brendanzab

This compiles:

#![forbid(deprecated)]

#[deprecated]
fn foo() {}

fn main() {
    foo();
}

http://is.gd/bQE1W1

More extensive example from @chrismorgan: http://is.gd/eRBKUc

This is annoying because I would love to use it to purge old stuff from my own codebase, rather than deferring it until the removal time, and risking usages creep back in with other PRs.

Activity

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

      Issue actions