Skip to content

Commit

Permalink
Add a regression test for #47131
Browse files Browse the repository at this point in the history
  • Loading branch information
varkor committed Mar 28, 2019
1 parent b3011dd commit 40db575
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/test/ui/dead-code-impl.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// run-pass

#![deny(dead_code)]

pub struct GenericFoo<T>(T);

type Foo = GenericFoo<u32>;

impl Foo {
fn bar(self) -> u8 {
0
}
}

fn main() {
println!("{}", GenericFoo(0).bar());
}

0 comments on commit 40db575

Please sign in to comment.