Rollup merge of #126051 - nnethercote:clarify-x-fmt-error, r=Nilstrieb

Clarify an `x fmt` error.

For anyone who was using paths with `x fmt` previously, make the error message a bit clearer.

r? ```@GuillaumeGomez```
This commit is contained in:
Jubilee 2024-06-06 14:46:22 -07:00 committed by GitHub
commit f739fefc76
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -118,7 +118,9 @@ fn print_paths(verb: &str, adjective: Option<&str>, paths: &[String]) {
pub fn format(build: &Builder<'_>, check: bool, all: bool, paths: &[PathBuf]) {
if !paths.is_empty() {
eprintln!("fmt error: path arguments are not accepted");
eprintln!(
"fmt error: path arguments are no longer accepted; use `--all` to format everything"
);
crate::exit!(1);
};
if build.config.dry_run() {