Skip to content

Commit 7d86754

Browse files
committed
Add test case for methods in traits that take uninhabited types
These should not currently be linted.
1 parent df3035a commit 7d86754

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/test/ui/uninhabited/uninhabited-function-parameter-warning.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@ fn foo(a: (), b: Void) { //~ ERROR functions with parameters of uninhabited type
88

99
trait Foo {
1010
fn foo(a: Self);
11+
12+
fn bar(b: Void);
1113
}
1214

1315
impl Foo for Void {
1416
fn foo(a: Void) {} // ok
17+
18+
fn bar(b: Void) {} // ok
1519
}
1620

1721
fn main() {}

0 commit comments

Comments
 (0)