Skip to content

Commit 40db575

Browse files
committed
Add a regression test for #47131
1 parent b3011dd commit 40db575

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/test/ui/dead-code-impl.rs

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// run-pass
2+
3+
#![deny(dead_code)]
4+
5+
pub struct GenericFoo<T>(T);
6+
7+
type Foo = GenericFoo<u32>;
8+
9+
impl Foo {
10+
fn bar(self) -> u8 {
11+
0
12+
}
13+
}
14+
15+
fn main() {
16+
println!("{}", GenericFoo(0).bar());
17+
}

0 commit comments

Comments
 (0)