Add test to ensure no index out of bounds panic (#135474) by reddevilmidzy · Pull Request #138509 · rust-lang/rust (original) (raw)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test needs a better name and should be placed into a subdirectory of tests/ui corresponding to what the test is exercising, rather than the top-level.

Specifically, I think you should look back at the original issue and/or the PR that fixed the issue to understand what was wrong with the code in the first place and/or why the issue was fixed, so that this can be named more accurately.