-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
borrowed_box gives syntactically invalid suggestion #3128
Comments
Thank you for the report! |
It isn't really an incorrect suggestion (though it may be a bad one - I dont know) so much that if you do it verbatim it cannot possibly compile due to rustc parsing limitations. Though it can also require changing the callsite which may or may not be unwanted for this lint. |
Actually, |
@logannc it builds and applying clippy suggestion causes compiler error similar to OP's. Therefore that's good example, thanks! |
I just stumbled upon the same issue, here's one more link to the playground :) |
Weird but it seems that the lint doesn't trigger anymore, can anyone confirm? Same for #3971 no? |
I believe it's because of the lint now ignores every mutable references (#5491), and both of the two playground link uses mutable references. However, this issue is actually unrelated to mutability. It happens when the trait objects have auto traits or lifetime bounds. |
@rust-lang/clippy. I think you'd better reopen this issue. |
It suggests
&mut Trait + 'a
, which is invalid syntax. It should be&mut (Trait + 'a)
instead.The text was updated successfully, but these errors were encountered: