summaryrefslogtreecommitdiffstats
path: root/tests/ui/privacy/auxiliary/issue-117997.rs
blob: 6f71cc2ba3570c1eb6f75d2bdfb031665c1df533 (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
34
35
// no-prefer-dynamic
// compile-flags: --crate-type=rlib

pub use impl_mod::TraitImplementer as Implementer;

pub use trait_mod::get_assoc;

mod impl_mod {
    use crate::trait_mod::TraitWithAssocType;

    pub struct TraitImplementer {}
    pub struct AssociatedType {}

    impl AssociatedType {
        pub fn method_on_assoc(&self) -> i32 {
            todo!()
        }
    }

    impl TraitWithAssocType for TraitImplementer {
        type AssocType = AssociatedType;
    }
}

mod trait_mod {
    use crate::Implementer;

    pub fn get_assoc() -> <Implementer as TraitWithAssocType>::AssocType {
        todo!()
    }

    pub trait TraitWithAssocType {
        type AssocType;
    }
}