]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/auxiliary/associated-types-cc-lib.rs
Merge commit 'c19edfd71a1d0ddef86c2c67fdb40718d40a72b4' into sync_cg_clif-2022-07-25
[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 }