Closed
Description
Summary
cargo clippy --fix
causes an index error.
Reproducer
I pushed the code that causes the error to this repo, so you can reproduce it. The error was triggerd by cargo clippy --fix
. Note that this does not seem to panic in stable.
thread 'main' panicked at 'slice index starts at 1 but ends at 0', library/core/src/slice/index.rs:91:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: could not compile `chess`
warning: build failed, waiting for other jobs to finish...
thread 'main' panicked at 'slice index starts at 1 but ends at 0', library/core/src/slice/index.rs:91:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: could not compile `chess`
Version
rustc 1.61.0-nightly (76d770ac2 2022-04-02)
binary: rustc
commit-hash: 76d770ac21d9521db6a92a48c7b3d5b2cc535941
commit-date: 2022-04-02
host: aarch64-apple-darwin
release: 1.61.0-nightly
LLVM version: 14.0.0
Additional Labels
No response