Skip to content

impl blocks and struct definitions aren't counted as uses of a type alias #43328

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

Closed
cramertj opened this issue Jul 19, 2017 · 2 comments
Closed

Comments

@cramertj
Copy link
Member

The following code results in "warning: type alias is never used: Bar":

struct Foo;

type Bar = Foo;

struct MyStruct(Bar);

impl Bar {
    fn buzz() {}
}

fn main() {
    MyStruct(Foo);
    Foo::buzz();
}
@est31
Copy link
Member

est31 commented Jul 19, 2017

Dupe of #43123

@cramertj
Copy link
Member Author

I'll add the extra case (struct definitions) to #43123 and close this.

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