]>
git.proxmox.com Git - rustc.git/blob - tests/ui/specialization/default-generic-associated-type-bound.rs
1 // Check that default generics associated types are validated.
3 #![feature(specialization)]
4 //~^ WARNING `specialization` is incomplete
7 type U
<'a
>: PartialEq
<&'a
Self> where Self: 'a
;
8 fn unsafe_compare
<'b
>(x
: Option
<Self::U
<'b
>>, y
: Option
<&'b
Self>) {
10 (Some(a
), Some(b
)) => a
== b
,
16 impl<T
: '
static> X
for T
{
17 default type U
<'a
> = &'a T
;
18 //~^ ERROR can't compare `T` with `T`
24 <NotComparable
as X
>::unsafe_compare(None
, None
);