Skip to content

Detect stability attributes on modules and crates #8962

Closed
@huonw

Description

@huonw
// some_crate.rs
#[experimental];

#[deprecated]
pub mod some_mod {
    pub fn foo() {}
} 
extern mod some_crate; // warning: use of experimental item

use some_crate::some_mod; // warning: use of deprecated item

fn main() {
    some_crate::some_mod::foo(); // warning: use of deprecated item
}

It seems unlikely that this should flag crates and modules without annotations, but I'm not really sure.

(Part of #6875, continuation of #8921.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-attributesArea: Attributes (`#[…]`, `#![…]`)A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions