summaryrefslogtreecommitdiffstats
path: root/tests/ui/associated-types/auxiliary/associated-types-cc-lib.rs
blob: b67853587068da4481dfa1b6b4cc1e2c4cf58f96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Helper for test issue-18048, which tests associated types in a
// cross-crate scenario.

#![crate_type="lib"]

pub trait Bar: Sized {
    type T;

    fn get(x: Option<Self>) -> <Self as Bar>::T;
}

impl Bar for isize {
    type T = usize;

    fn get(_: Option<isize>) -> usize { 22 }
}