Better error reporting for Sync and type that impl !Sync #46678
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-trait-system
Area: Trait system
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
It would make a lot more sense if when a type
impl !Sync
the compiler could report an other error than the error that comes from this impl block.For example, take a look at this code :
Which outputs :
It would be way better if it could just say that
Receiver
is explicitly notSync
.I know that this a bad example because the error is actually due to the fact that the compiler does not move
rx
because we are returning a value from the call tomap()
, but it was the only one that I had...The text was updated successfully, but these errors were encountered: