Rollup merge of #143719 - xizheyin:142812-1, r=jieyouxu

Emit warning when there is no space between `-o` and arg

Closes rust-lang/rust#142812

`getopt` doesn't seem to have an API to check this, so we have to check the args manually.

r? compiler
This commit is contained in:
Matthias Krüger
2025-07-18 04:27:51 +02:00
committed by GitHub
4 changed files with 147 additions and 0 deletions

View File

@@ -1708,6 +1708,11 @@ impl RustcOptGroup {
OptionKind::FlagMulti => options.optflagmulti(short_name, long_name, desc),
};
}
/// This is for diagnostics-only.
pub fn long_name(&self) -> &str {
self.long_name
}
}
pub fn make_opt(