Add test for #2472
This commit is contained in:
parent
fa0e96e0f7
commit
83b42c806f
2 changed files with 25 additions and 0 deletions
14
src/test/auxiliary/issue_2472_b.rs
Normal file
14
src/test/auxiliary/issue_2472_b.rs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
enum S = ();
|
||||
|
||||
impl S {
|
||||
fn foo() { }
|
||||
}
|
||||
|
||||
trait T {
|
||||
fn bar();
|
||||
}
|
||||
|
||||
impl S: T {
|
||||
fn bar() { }
|
||||
}
|
||||
11
src/test/run-pass/issue-2472.rs
Normal file
11
src/test/run-pass/issue-2472.rs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
// aux-build:issue_2472_b.rs
|
||||
|
||||
use issue_2472_b;
|
||||
|
||||
import issue_2472_b::{S, T};
|
||||
|
||||
fn main() {
|
||||
let s = S(());
|
||||
s.foo();
|
||||
s.bar();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue