-
Notifications
You must be signed in to change notification settings - Fork 1.7k
clippy::useless_asref suggestion doesn't compile in 1.77.0 #12357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@rustbot label +I-suggestion-causes-error |
Verified that the issue is still present in stable 1.77.0. |
Looks like my example would be covered by #12535; I'm leaving this open though in case this is a general problem that would affect a wider range of types (besides |
A pattern I see this showing up is Still shows up in 1.77.2. |
Still broken in 1.79; 1.80-beta.4; and nightly-2024-06-25. |
Still broken in 1.82; 1.83.0-beta.4; and nightly-2024-11-01. |
Summary
The
useless_asref
lint (in rust 1.77) suggests a fix that does not compile.Perhaps related to #12148?
Lint Name
useless_asref
Reproducer
I tried this code:
I saw this happen:
And if I apply the suggestion:
I expected to see this happen:
Either no lint should fire, or the suggested fix should compile.
Version
The text was updated successfully, but these errors were encountered: