-
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
Crash in use_self: LateContext::typeck_results called outside of body #7423
Comments
Clippy crash: rust-lang/rust-clippy#7423 thread 'rustc' panicked at '`LateContext::typeck_results` called outside of body', src/tools/clippy/clippy_lints/src/use_self.rs:213:20 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace error: internal compiler error: unexpected panic note: the compiler unexpectedly panicked. this is a bug. query stack during panic: #0 [analysis] running analysis passes on this crate end of query stack
So much for making it less fragile 😭 |
@dtolnay Do you have any projects that would be good for Clippy integration tests? |
I already have a bunch of crates in lintcheck_crates.toml, but they seem to often get hit by false positives anyway. The project affected by this crash is already in there:
Many of the projects affected by #7422 and #7421 are already in there too. |
Wait, I got an error from |
Does lintcheck need to be louder when ICE occurs? Also we have integration tests that are separate from the lintcheck list, right? cxx seems like a good candidate for that. |
Fix use_self ICE changelog: Fix ICE #7423 r? `@flip1995`
Fixed in #7428
I guess so? We should also make it easier to use, or rather use it more often. |
Sorry to bother you but I am currently getting this issue with Clippy 0.1.55 (8853999 2021-07-06), given the date (2021-07-06) I believe I am using the version with the fix merged in. Am I reading the version wrong (and should wait for a version bump) or is this still not completely resolved. I do not have the trait macro pattern described in the original post but still get the following error thread 'rustc' panicked at '`LateContext::typeck_results` called outside of body', src/tools/clippy/clippy_lints/src/use_self.rs:213:20
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new
note: Clippy version: clippy 0.1.55 (88539999 2021-07-06)
query stack during panic:
#0 [analysis] running analysis passes on this crate
end of query stack Please let me know if any more details would be required |
8853999 does not have the fix. See https://github.com/rust-lang/rust/blob/88539999/src/tools/clippy/clippy_lints/src/use_self.rs#L90. |
Thanks for the info :). Sorry about that |
I haven't gotten to sync it to nightly yet. Our next regular sync is in 8 days, so I guess I won't do an out-of-cycle sync now. This will definitely not hit beta/stable. |
Code
Meta
cargo clippy -V
: clippy 0.1.55 (798baeb 2021-07-02)rustc -Vv
:Error output
Backtrace
Mentioning @camsteffen @flip1995 who touched this lint recently in #7411.
The text was updated successfully, but these errors were encountered: