about summary refs log tree commit diff
path: root/tests/ui/privacy/privacy1-rpass.rs
blob: 546492c870947ddea1289414b2acae3599e92886 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//@ run-pass
#![allow(dead_code)]

pub mod test2 {
    // This used to generate an ICE (make sure that default functions are
    // parented to their trait to find the first private thing as the trait).

    struct B;
    trait A { fn foo(&self) {} }
    impl A for B {}

    mod tests {
        use super::A;
        fn foo() {
            let a = super::B;
            a.foo();
        }
    }
}


pub fn main() {}