Closed
Description
As requested in #53345 (comment), here's a follow up.
The following code below implements the trait MyTrait
for an alias Bar
, which is an alias to MyTrait
. It doesnt really make sense to implement a trait...for that same trait.
type_alias_impl_trait doesn't mention anything about this, however the previous existential_type notes:
One last difference between existential type aliases and normal type aliases is that existential type aliases cannot be used in impl blocks
#![feature(type_alias_impl_trait)]
trait MyTrait {}
impl MyTrait for () {}
type Bar = impl MyTrait;
impl MyTrait for Bar {}
fn bazr() -> Bar { }
fn main() {}
Im not sure this should be allowed.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done