diff --git a/toolchain/driver/compile_subcommand.cpp b/toolchain/driver/compile_subcommand.cpp index b4af7bf4758f..f39949cbca1a 100644 --- a/toolchain/driver/compile_subcommand.cpp +++ b/toolchain/driver/compile_subcommand.cpp @@ -787,8 +787,8 @@ auto CompileSubcommand::Run(DriverEnv& driver_env) -> DriverResult { } // Unlike previous steps, errors block further progress. - if (std::any_of(units.begin(), units.end(), - [&](const auto& unit) { return !unit->success(); })) { + if (std::ranges::any_of(units, + [&](const auto& unit) { return !unit->success(); })) { CARBON_VLOG_TO(driver_env.vlog_stream, "*** Stopping before lowering due to errors ***"); return make_result();