### What it does If you assert before indexing, Rust will remove the bounds checks on the indexings. An example: https://godbolt.org/z/fczP9YTbj (correctly optimizes at opt-level=1 and higher) ### Lint Name multiple-indexing-assert-length ### Category _No response_ ### Advantage - Improved performance ### Drawbacks _No response_ ### Example ```rust let _ = x[0]; // bounds check here let _ = x[1..4]; // bounds check here ``` Could be written as: ```rust assert!(x.len() >= 10); let _ = x[0]; // no bounds check here let _ = x[1..4]; // or here ``` <!-- TRIAGEBOT_START --> <!-- TRIAGEBOT_ASSIGN_START --> <!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"y21"}$$TRIAGEBOT_ASSIGN_DATA_END --> <!-- TRIAGEBOT_ASSIGN_END --> <!-- TRIAGEBOT_END -->