Method as_ref
not suggested when it should
#55198
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
as_ref
not suggested when it should
#55198
Uh oh!
There was an error while loading. Please reload this page.
As per https://www.reddit.com/r/rust/comments/9pb3ah/what_cool_stuff_have_you_learned_about_rust/e80zqpc/, I'm reporting a case where the method
as_ref
is not suggested by the compiler to use to convert an&Option<T>
to anOption<&T>
. Here's a playground link, the non-working code isThe playground is using stable, I'm seeing this behavior on
rustc 1.31.0-nightly (de3d640f5 2018-10-01)
as well locally. If I should provide more information, let me know :)The text was updated successfully, but these errors were encountered: