blob: 0e6f57c33f64a26f213db38ac52b47ce5d0f6e08 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
// Test that methods defined in another crate are resolved correctly their
// names differ only in `SyntaxContext`. This also checks that any name
// resolution done when monomorphizing is correct.
// run-pass
// aux-build:methods.rs
extern crate methods;
use methods::*;
struct A;
struct B;
struct C;
impl MyTrait for A {}
test_trait!(impl for B);
test_trait2!(impl for C);
fn main() {
check_crate_local();
check_crate_local_generic(A, B);
check_crate_local_generic(A, C);
test_trait!(check_resolutions);
test_trait2!(check_resolutions);
test_trait!(assert_no_override A);
test_trait2!(assert_no_override A);
test_trait!(assert_override B);
test_trait2!(assert_override B);
test_trait!(assert_override C);
test_trait2!(assert_override C);
}
|