Add a lint to warn about &(dyn … + Send)
#110937
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
E-help-wanted
Call for participation: Help is requested to fix this issue.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Adding
+ Send
to a&dyn
is a useless restriction. E.g.&(dyn Any + Send)
implicitly converts to&dyn Any
, but not the other way around, even though it'd be sound to just transmute it in both directions, since theSend
isn't of any use for (shared) references.It'd be nice if we suggest removing the
+ Send
for&(dyn … + Send)
.See #110799
The text was updated successfully, but these errors were encountered: