Remove unnecessary capture of the diagnostics type checker.