]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/associated-types/associated-types-normalize-in-bounds.rs
2 #![allow(unused_variables)]
3 // Test that we normalize associated types that appear in bounds; if
4 // we didn't, the call to `self.split2()` fails to type check.
6 // pretty-expanded FIXME #23616
8 use std
::marker
::PhantomData
;
10 struct Splits
<'a
, T
, P
>(PhantomData
<(&'
a(),T
,P
)>);
11 struct SplitsN
<I
>(PhantomData
<I
>);
16 fn split2
<'a
, P
>(&'a
self, pred
: P
) -> Splits
<'a
, Self::Item
, P
>
17 where P
: FnMut(&Self::Item
) -> bool
;
18 fn splitn2
<'a
, P
>(&'a
self, n
: usize, pred
: P
) -> SplitsN
<Splits
<'a
, Self::Item
, P
>>
19 where P
: FnMut(&Self::Item
) -> bool
;
22 impl<T
> SliceExt2
for [T
] {
25 fn split2
<P
>(&self, pred
: P
) -> Splits
<T
, P
> where P
: FnMut(&T
) -> bool
{
29 fn splitn2
<P
>(&self, n
: usize, pred
: P
) -> SplitsN
<Splits
<T
, P
>> where P
: FnMut(&T
) -> bool
{