Skip to content

Commit 83b42c8

Browse files
committed
Add test for #2472
1 parent fa0e96e commit 83b42c8

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

src/test/auxiliary/issue_2472_b.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
enum S = ();
3+
4+
impl S {
5+
fn foo() { }
6+
}
7+
8+
trait T {
9+
fn bar();
10+
}
11+
12+
impl S: T {
13+
fn bar() { }
14+
}

src/test/run-pass/issue-2472.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// aux-build:issue_2472_b.rs
2+
3+
use issue_2472_b;
4+
5+
import issue_2472_b::{S, T};
6+
7+
fn main() {
8+
let s = S(());
9+
s.foo();
10+
s.bar();
11+
}

0 commit comments

Comments
 (0)