Auto merge of #5129 - JohnTitor:use-checked-sub, r=flip1995
Auto merge of #5129 - JohnTitor:use-checked-sub, r=flip1995

Use `checked_sub` to avoid index out of bounds

(Fixes) #4681 (possibly)

The issue likely occurs due to `lit_snip.len() < suffix.len() + 1`. You can see similar backtrace to change it to `lit_snip.len() - suffix.len() - 1000` or something then run `cargo test --release`.
But I couldn't come up with the test so I'd leave the issue open if we want.

changelog: Fix potential ICE in `misc_early`

aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,aidancully/rust