Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unused_imports lint fails to trigger on traits that are considered but rejected #29920

Closed
wthrowe opened this issue Nov 19, 2015 · 1 comment
Closed

Comments

@wthrowe
Copy link
Contributor

wthrowe commented Nov 19, 2015

This compiles:

#![forbid(unused_imports)]

mod foo {
    pub trait Tr {
        fn func(&self) {}
    }
    impl Tr for u8 {}

    pub trait Tr2 {
        fn func(&self);
    }
}

fn main() {
    use foo::Tr;
    use foo::Tr2; // This is unused
    1u8.func();
}
@sanxiyn
Copy link
Member

sanxiyn commented Nov 23, 2015

Closing as a duplicate of #25730.

@sanxiyn sanxiyn closed this as completed Nov 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants