You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.
While working on rust-lang/rust#59398 I encountered this crash where rustfix crashes on retrieving the suggestions:
Expand backtrace
thread 'everything' panicked at 'byte index 2 is out of bounds of `}`', src/libcore/str/mod.rs:2010:9
stack backtrace:
0: 0x564b396bb7d3 - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h3ea4e797e65a328d
at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
1: 0x564b396b757b - std::sys_common::backtrace::_print::hf58574b7d5a741ab
at src/libstd/sys_common/backtrace.rs:71
2: 0x564b396ba476 - std::panicking::default_hook::{{closure}}::hed8b316a41353ca9
at src/libstd/sys_common/backtrace.rs:59
at src/libstd/panicking.rs:197
3: 0x564b396ba19e - std::panicking::default_hook::h8f4ba314e61c5eff
at src/libstd/panicking.rs:208
4: 0x564b396bab7f - std::panicking::rust_panic_with_hook::hde5d2bfa491b5add
at src/libstd/panicking.rs:474
5: 0x564b396ba701 - std::panicking::continue_panic_fmt::h928c357471014704
at src/libstd/panicking.rs:381
6: 0x564b396ba5e5 - rust_begin_unwind
at src/libstd/panicking.rs:308
7: 0x564b396d5d3c - core::panicking::panic_fmt::h5ab350f3b9a2b236
at src/libcore/panicking.rs:85
8: 0x564b396d75cf - core::str::slice_error_fail::h8551c49db625e656
at src/libcore/str/mod.rs:0
9: 0x564b3948ea8f - core::str::traits::<impl core::slice::SliceIndex<str> for core::ops::range::Range<usize>>::index::{{closure}}::h2b84c086
6fdd5130
at /rustc/0f88167f89fffe321590c5148f21b7d51d44388d/src/libcore/str/mod.rs:1751
10: 0x564b394938af - core::option::Option<T>::unwrap_or_else::he9ebd301cf0dbcdb
at /rustc/0f88167f89fffe321590c5148f21b7d51d44388d/src/libcore/option.rs:386
11: 0x564b39492f25 - core::str::traits::<impl core::slice::SliceIndex<str> for core::ops::range::Range<usize>>::index::ha86fa6cbfda6a990
at /rustc/0f88167f89fffe321590c5148f21b7d51d44388d/src/libcore/str/mod.rs:1751
12: 0x564b3948ec10 - core::str::traits::<impl core::ops::index::Index<I> for str>::index::h12989e8413e52b49
at /rustc/0f88167f89fffe321590c5148f21b7d51d44388d/src/libcore/str/mod.rs:1616
13: 0x564b3943eb20 - <alloc::string::String as core::ops::index::Index<core::ops::range::Range<usize>>>::index::hc28f4c5a88ab385d
at /rustc/0f88167f89fffe321590c5148f21b7d51d44388d/src/liballoc/string.rs:1953
14: 0x564b3944a30b - rustfix::parse_snippet::h40fa32a6f9ed0564
at src/lib.rs:120
15: 0x564b393a816f - rustfix::collect_suggestions::{{closure}}::h396f64ade2bb2873
at /home/phansch/code/rustfix/src/lib.rs:166
While working on rust-lang/rust#59398 I encountered this crash where rustfix crashes on retrieving the suggestions:
Expand backtrace
Minimal repro:
Rusts error message looks like this:
I'm not sure if it's worth investigating because this particular error doesn't provide a suggestion.
The
DiagnosticSpan
looks like this:The second
DiagnosticSpanLine
causes the crash inparse_snippet
.The text was updated successfully, but these errors were encountered: