]> git.proxmox.com Git - rustc.git/blob - tests/ui/associated-types/auxiliary/associated-types-cc-lib.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / 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 }