]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/associated-types/normalization-generality-2.rs
3 // Ensures that we don't regress on "implementation is not general enough" when
4 // normalizating under binders. Unlike `normalization-generality.rs`, this also produces
5 // type outlives predicates that we must ignore.
7 pub unsafe trait Yokeable
<'a
> {
10 pub struct Yoke
<Y
: for<'a
> Yokeable
<'a
>> {
11 _marker
: std
::marker
::PhantomData
<Y
>,
13 impl<Y
: for<'a
> Yokeable
<'a
>> Yoke
<Y
> {
16 _f
: for<'a
> fn(&<Y
as Yokeable
<'a
>>::Output
, &'
a ()) -> <P
as Yokeable
<'a
>>::Output
,
19 P
: for<'a
> Yokeable
<'a
>,
24 pub fn slice(y
: Yoke
<&'
static str>) -> Yoke
<&'
static [u8]> {
25 y
.project(move |yk
, _
| yk
.as_bytes())
27 unsafe impl<'a
, T
: '
static + ?Sized
> Yokeable
<'a
> for &'
static T
{