]>
git.proxmox.com Git - rustc.git/blob - tests/ui/type-alias-impl-trait/impl_trait_for_same_tait.rs
1 #![feature(type_alias_impl_trait)]
7 type Bar
<T
: Foo
> = impl std
::fmt
::Debug
;
8 fn defining_use
<T
: Foo
>() -> Bar
<T
> {
14 impl Bop
for Bar
<()> {}
16 // If the hidden type is the same, this is effectively a second impl for the same type.
17 impl Bop
for Bar
<i32> {}
18 //~^ ERROR conflicting implementations
20 type Barr
= impl std
::fmt
::Debug
;
21 fn defining_use2() -> Barr
{
25 // Even completely different opaque types must conflict.
27 //~^ ERROR conflicting implementations
29 // And obviously the hidden type must conflict, too.
31 //~^ ERROR conflicting implementations