rust-lang/rustfix

thread 'main' panicked at 'begin <= end (6 <= 0) when slicing ``

Closed this issue · 4 comments

After a bunch of times pressing r while running rustfix on trust-dns:

Suggestion accepted. I'll remember that and apply it later.
thread 'main' panicked at 'begin <= end (6 <= 0) when slicing ``', ../src/libcore/str/mod.rs:1692
stack backtrace:
   1:        0x10d41db0b - std::sys::backtrace::tracing::imp::write::h29f5fdb9fc0a7395
   2:        0x10d4230ca - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::h2cc84f0378700526
   3:        0x10d421788 - std::panicking::default_hook::hbbe7fa36a995aca0
   4:        0x10d421e18 - std::panicking::rust_panic_with_hook::h105c3d42fcd2fb5e
   5:        0x10d421c76 - std::panicking::begin_panic::hbf62ea4a5ff3f9de
   6:        0x10d421b88 - std::panicking::begin_panic_fmt::h20f5943904e5791d
   7:        0x10d421adf - rust_begin_unwind
   8:        0x10d449150 - core::panicking::panic_fmt::h19323e466869c656
   9:        0x10d44a07a - core::str::slice_error_fail::h0bcf68c8ce40ec27
  10:        0x10d3aa2ff - rustfix::handle_suggestions::h78dd61d6c28e0b4e
  11:        0x10d3a863c - rustfix::main::hecb56893e98700f4
  12:        0x10d421a4d - std::panicking::try::call::h5df3ac2979db3c90
  13:        0x10d4233eb - __rust_try
  14:        0x10d4232a5 - __rust_maybe_catch_panic
  15:        0x10d421101 - std::rt::lang_start::hfe9ab243c60ffb9b

I can't reproduce (tried the exact commit referenced and latest master). Probably fixed in clippy or rustc

Or... rustfix run in silent mode doesn't complain if the crate doesn't compile -.-

So the old version doesn't compile anymore. The openssl crate just doesn't work, even after a cargo update. Latest master doesn't crash rustfix, no matter which sub-crate of the repo I build.

Hm, I remember this is something I encountered a few times, but never could tell why. Are you running rustfix with debug assertions? Else the bound checks might be stripped away.

rustfix run in silent mode doesn't complain if the crate doesn't compile

Heh, that's probably not that helpful. Open an issue?