Error messages confusing trying to return errors across threads #75001
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
D-newcomer-roadblock
Diagnostics: Confusing error or lint; hard to understand for new users.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Compiling:
Gives:
Since this is the frequently suggested idiom for being able to return any kind of error, it can be surprising to users that it doesn't seem to work for threads other than the main thread. It could suggest adding Send, and then users can quickly run into another problem:
Where they will get the error:
Which is confusing even for people who know about Send, because intuitively we should be able to convert from something with more requirements to something with less requirements.
The text was updated successfully, but these errors were encountered: