nightly-only types are confusing in error[E0277]: ?
couldn't convert the error to ...
#121521
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
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.
S-has-mcve
Status: A Minimal Complete and Verifiable Example has been found for this issue
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
I'm not sure.
Rationale and extra context
This is a very common error, and it's likely to be encountered by people new to Rust.
The
note
andhelp
text mentions two different types that are nightly-only (Yeet
,FromResidual
). To someone who is learning the language or only using the stable compiler, this is both confusing and unhelpful.I think the stable compiler should avoid mentioning internal or nightly-only types, and when possible, the advice given should be understandable and actionable by someone new to the language.
If the last two messages are only going to talk about nightly only types, and they're not actually helpful to someone using the stable compiler, maybe they should just be removed?
Other cases
No response
Rust Version
Anything else?
I filed this bug after a conversation with @estebank on mastodon. 👋
The text was updated successfully, but these errors were encountered: