Auto merge of #34201 - sanxiyn:check-error-index, r=nagisa
Auto merge of #34201 - sanxiyn:check-error-index, r=nagisa

Check error index in `make check`

This was checked in rustbuild but not in `make check`, causing passed-Travis-but-failed-Buildbot.

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