Port check_const from oldvisit to @Visitor trait object API.
Remove unused use syntax::visit;
Port check_loop from oldvisit to @Visitor trait object API.