Skip to content

Detect stability attributes on methods #8961

Closed

Description

@huonw
struct Foo;
impl Foo {
    #[deprecated]
    fn method(&self) {}
}

fn main() {
    Foo.method();
}

doesn't flag the use of method, since method calls are not in the def_map. As discussed in #8921, this will require passing the method_map from typeck into lint (or something along those lines).

(Part of #6875.)

Activity

  1. added a commit that references this issue on Dec 17, 2013
    dc65762
  2. added a commit that references this issue on Oct 6, 2022
    8da2429
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-attributesArea: Attributes (`#[…]`, `#![…]`)A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions