]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/auxiliary/associated-types-cc-lib.rs
Merge commit '4f3ab69ea0a0908260944443c739426cc384ae1a' into clippyup
[rust.git] / src / test / ui / associated-types / auxiliary / associated-types-cc-lib.rs
1 // Helper for test issue-18048, which tests associated types in a
2 // cross-crate scenario.
3
4 #![crate_type="lib"]
5
6 pub trait Bar: Sized {
7     type T;
8
9     fn get(x: Option<Self>) -> <Self as Bar>::T;
10 }
11
12 impl Bar for isize {
13     type T = usize;
14
15     fn get(_: Option<isize>) -> usize { 22 }
16 }