mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-02 10:04:23 +00:00
Merge pull request #1752 from topecongiro/supress-write-mode-warning
Suppress write mode warning
This commit is contained in:
commit
617578146f
@ -78,7 +78,7 @@ impl CliOptions {
|
||||
format!("Invalid write-mode: {}", write_mode),
|
||||
));
|
||||
}
|
||||
} else {
|
||||
} else if !matches.opt_present("no-warn-write-mode") {
|
||||
println!(
|
||||
"Warning: the default write-mode for Rustfmt will soon change to overwrite \
|
||||
- this will not leave backups of changed files."
|
||||
@ -120,6 +120,12 @@ fn make_opts() -> Options {
|
||||
opts.optflag("h", "help", "show this message");
|
||||
opts.optflag("V", "version", "show version information");
|
||||
opts.optflag("v", "verbose", "print verbose output");
|
||||
// Suppress warning. Remove this option after the default write mode changed to overwrite.
|
||||
opts.optflag(
|
||||
"w",
|
||||
"no-warn-write-mode",
|
||||
"inhibit warning about write-mode change",
|
||||
);
|
||||
opts.optopt(
|
||||
"",
|
||||
"write-mode",
|
||||
|
Loading…
Reference in New Issue
Block a user