-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.F-type_alias_impl_trait`#[feature(type_alias_impl_trait)]``#[feature(type_alias_impl_trait)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way.This issue requires a nightly compiler in some way.
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
C-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.F-type_alias_impl_trait`#[feature(type_alias_impl_trait)]``#[feature(type_alias_impl_trait)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way.This issue requires a nightly compiler in some way.
Type
Projects
Status
Done