Skip to content
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

clippy --fix crash/panic #8718

Closed
bigdogs opened this issue Apr 18, 2022 · 3 comments
Closed

clippy --fix crash/panic #8718

bigdogs opened this issue Apr 18, 2022 · 3 comments
Labels
C-bug Category: Clippy is not doing the correct thing I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@bigdogs
Copy link

bigdogs commented Apr 18, 2022

Summary

thread 'main' panicked at 'slice index starts at 1 but ends at 0', library/core/src/slice/index.rs:92:5
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::slice::index::slice_index_order_fail_rt
   3: core::ops::function::FnOnce::call_once
   4: core::intrinsics::const_eval_select
   5: core::slice::index::slice_index_order_fail
   6: rustfix::parse_snippet
   7: rustfix::collect_span
   8: <alloc::vec::Vec<rustfix::Replacement> as alloc::vec::spec_from_iter::SpecFromIter<rustfix::Replacement, core::iter::adapters::filter_map::FilterMap<core::iter::adapters::filter::Filter<core::slice::iter::Iter<rustfix::diagnostics::DiagnosticSpan>, rustfix::collect_suggestions<std::collections::hash::map::RandomState>::{closure#1}::{closure#0}>, rustfix::collect_span>>>::from_iter
   9: <&mut rustfix::collect_suggestions<std::collections::hash::map::RandomState>::{closure#1} as core::ops::function::FnMut<(&rustfix::diagnostics::Diagnostic,)>>::call_mut
  10: <alloc::vec::Vec<rustfix::Solution> as alloc::vec::spec_from_iter::SpecFromIter<rustfix::Solution, core::iter::adapters::filter_map::FilterMap<core::slice::iter::Iter<rustfix::diagnostics::Diagnostic>, rustfix::collect_suggestions<std::collections::hash::map::RandomState>::{closure#1}>>>::from_iter
  11: rustfix::collect_suggestions::<std::collections::hash::map::RandomState>
  12: cargo::ops::fix::fix_maybe_exec_rustc
  13: cargo::main

Reproducer

Not sure how to reproduce it with minimal code, it just happen on my project after I updating my rust

Version

rustc 1.62.0-nightly (34a6c9f26 2022-04-13)
binary: rustc
commit-hash: 34a6c9f26e2ce32cad0d71f5e342365b09f4d12c
commit-date: 2022-04-13
host: aarch64-apple-darwin
release: 1.62.0-nightly
LLVM version: 14.0.0

Additional Labels

No response

@bigdogs bigdogs added the C-bug Category: Clippy is not doing the correct thing label Apr 18, 2022
@xFrednet xFrednet added the I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️ label Apr 18, 2022
@xFrednet
Copy link
Member

Hey, thank you for the report. Could you maybe provide a code snipped to reproduce this error? 🙃

@bigdogs
Copy link
Author

bigdogs commented Apr 21, 2022

@xFrednet Hi, Thank you for the support. But I'm sorry about that I can't reproduce this crash now :(

@xFrednet
Copy link
Member

Weird, it could be that this was fixed or it just was an issue with caching? Would it be alright with you if we close the issue? There is little we can do right now, and it's always easy to reopen it. 🙃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

2 participants