-
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
new_ret_no_self complains about new() -> impl Future<Self> if new() takes parameters #3220
Comments
I've attempted to start solving this one and I ran into a couple issues. First, I could not find existing tests for I created a test based on this, and then modified this lint slightly, and the compiler crashes when running The actual error message:
Is this something I am doing, or is it possibly an actual compiler issue? |
"The compiler unexpectedly panicked" happens if the compiler API panics. clippy lints plug into the compiler API. So yes, I would start by assuming it's from your change. |
@JoshMcguigan run the test with |
Thanks for the help. The relevant part of the trace:
It was caused by calling At this point I've fixed the false negative when |
I opened a PR (#3253) which resolves this issue as well as another issue with this lint, but I'm not sure I did it in the best possible way. I'd be very open to any feedback. |
Update clippy to use stable toolchain. Fix all errors that came about. Change cfg_attr("cargo-clippy"= allow/deny) to just allow/deny clippy::* Remove clippy workarounds for new_ret_no_self (clippy bug: rust-lang/rust-clippy#3220) Updated devguide Clippy isn't preview any more, but added instructions to update toolchain and rustup if you already have older version of Rust installed and can't find rustfmt or clippy.
0.0.212 (2018-09-17 125907a)
Playground
If
S::new()
does not have theString
parameter, the lint does not complain.The text was updated successfully, but these errors were encountered: