-
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
RLS crashes on clippyusing rustc 1.39.0-nightly (eb48d6bde 2019-09-12) #4681
Comments
Can you share code on which this panic occurs? |
It may have something to do with this index: rust-clippy/clippy_lints/src/misc_early.rs Line 490 in 07c0673
|
This is happening while compiling a project with 300+ dependencies most of which are not public so it's hard to share. Not even sure which of the crates it's crashing but happy to do more tests if you give me any guidelines on how |
Crash message should contain crate name at the bottom, if it's public crate knowing it's name could help. |
this is all i get in the output from RLS:
The package compiles fine out of RLS |
Does it also pass when you run I it crashes while running |
Use `checked_sub` to avoid index out of bounds (Fixes) #4681 (possibly) The issue likely occurs due to `lit_snip.len() < suffix.len() + 1`. You can see similar backtrace to change it to `lit_snip.len() - suffix.len() - 1000` or something then run `cargo test --release`. But I couldn't come up with the test so I'd leave the issue open if we want. changelog: Fix potential ICE in `misc_early`
@arturoc Could you check if latest nightly's Clippy fixes your issue? |
sorry don't remember how i worked around this issue or if it was fixed at some point but i haven't seen this problem in latest versions so i'll assume it was fixed. i'll close this and report back if i ever found this again. Thanks! |
The text was updated successfully, but these errors were encountered: