Skip to content

Detect stability attributes on methods #8961

Closed
@huonw

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.)

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