Check for whether index is out of bound during compilation failed unexpectedly #124889
Labels
A-lint
Area: Lints (warnings about flaws in source code) such as unused_mut.
C-bug
Category: This is a bug.
L-unconditional_panic
Lint: unconditional_panic
S-has-mcve
Status: A Minimal Complete and Verifiable Example has been found for this issue
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried these two codes:
I expected to see this happen:
When running
cargo build
,"index out of bounds: the length is 12 but the index is 20" should be indicated for both codes
Instead, this happened:
Only Code 2 had it
Meta
rustc --version --verbose
:Backtrace
Building:
Running(Code 1):
The text was updated successfully, but these errors were encountered: