- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Closed
Labels
A-trait-systemArea: Trait systemArea: Trait systemC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-langRelevant to the language teamRelevant to the language team
Description
For some trait, Trait, the following is a legal type: type Send2 = Trait + Send + Send.
Not only that, but the type is actually distinct from type Send1 = Trait + Send. E.g., you can put inherent methods on both, and call them distinctly. I've a full example of this here.
Unfortunately, this is already in stable Rust, but at the same time, I don't think anybody is actually relying on this corner of the language. It should be an error to have the same trait twice in a trait object (except perhaps via generics), or at least make cases like Send1 and Send2 be equivalent.
sdleffler, strega-nil, samnardoni and avlkennytm, strega-nil, samnardoni and avl
Metadata
Metadata
Assignees
Labels
A-trait-systemArea: Trait systemArea: Trait systemC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-langRelevant to the language teamRelevant to the language team