]>
Commit | Line | Data |
---|---|---|
54a0048b SL |
1 | // compile-flags: -Cmetadata=aux |
2 | ||
9346a6ac AL |
3 | pub trait Deref { |
4 | type Target: ?Sized; | |
223e47cc | 5 | |
9346a6ac AL |
6 | fn deref<'a>(&'a self) -> &'a Self::Target; |
7 | } | |
8 | ||
9 | pub trait Add<RHS = Self> { | |
10 | type Output; | |
11 | ||
12 | fn add(self, rhs: RHS) -> Self::Output; | |
13 | } | |
14 | ||
15 | ||
16 | pub trait Bar {} | |
17 | pub trait Deref2 { | |
18 | type Target: Bar; | |
19 | ||
20 | fn deref(&self) -> Self::Target; | |
21 | } | |
22 | ||
23 | pub trait Index<Idx: ?Sized> { | |
85aaf69f | 24 | type Output: ?Sized; |
9346a6ac AL |
25 | fn index(&self, index: Idx) -> &Self::Output; |
26 | } | |
27 | ||
28 | pub trait IndexMut<Idx: ?Sized>: Index<Idx> { | |
29 | fn index_mut(&mut self, index: Idx) -> &mut Self::Output; | |
223e47cc | 30 | } |