impl-trait-goals icon indicating copy to clipboard operation
impl-trait-goals copied to clipboard

Explicitly opt-out of auto traits

Open cramertj opened this issue 7 years ago • 0 comments

Auto traits currently leak through impl Trait. It might be nice to provide a way to explicitly state that an impl Trait does not promise Send or Sync in order to prevent users from relying on the Send or Sync ability of the leaked type.

Note: this could be achieved by a wrapper type that is !Send or !Sync, but that is inconvenient to say the least.

cramertj avatar Jun 05 '17 07:06 cramertj