Skip to content

Incorrect "type alias is never used" #42303

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
stepancheg opened this issue May 29, 2017 · 1 comment
Closed

Incorrect "type alias is never used" #42303

stepancheg opened this issue May 29, 2017 · 1 comment
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut.

Comments

@stepancheg
Copy link
Contributor

struct Foo;

type Bar = Foo;

impl Bar {
    fn baz(&self) {}
}

fn main() {
    Foo.baz();
}
rustc 1.17.0 (56124baa9 2017-04-24)
warning: type alias is never used: `Bar`
 --> <anon>:3:1
  |
3 | type Bar = Foo;
  | ^^^^^^^^^^^^^^^
  |
  = note: #[warn(dead_code)] on by default
@petrochenkov petrochenkov added the A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. label May 29, 2017
est31 added a commit to est31/rust that referenced this issue May 30, 2017
@Mark-Simulacrum
Copy link
Member

Closing in favor of more general #18290.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut.
Projects
None yet
Development

No branches or pull requests

3 participants