Remove unused variables in `compile_submatch`.

Just an minor cleanup.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
auto merge of #7997 : omasanori/rust/cleanup, r=cmr

Just an minor cleanup.