-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Suggestion for hint: wrap in Some #5443
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Rustc does suggest to use
|
We now show the rustc hint, and also have a builtin diagnostic + quickfix when this happens in a function's return value |
The first diagnostic comes from rustc, the |
We can actually close this now that wrap in some is a proper type mismatch diagnostic I believe. |
Ahh, you're right, thanks. This is currently tracked at rust-lang/rust#26454 |
Consider this error:
"Expected Option<T>, found T"
A useful hint/suggestion would be to propose wrapping the erroring expression in
Some
The text was updated successfully, but these errors were encountered: