mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-27 14:24:08 +00:00
Add test for #2472
This commit is contained in:
parent
fa0e96e0f7
commit
83b42c806f
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…
Reference in New Issue
Block a user