Skip to content

Commit 346b094

Browse files
committed
Auto merge of rust-lang#12218 - jhpratt:manifest-options-doc, r=blyxyas
Document manifest options All built-in cargo commands have this output included when run with `cargo foo --help`. Clippy is the only exception, so I have copied the text here. As far as I can tell, the flags come from Cargo itself and not clippy, but the user almost certainly does not care about that. ```text Manifest Options: --manifest-path <PATH> Path to Cargo.toml --frozen Require Cargo.lock and cache are up to date --locked Require Cargo.lock is up to date --offline Run without accessing the network ``` changelog: Add the standard Manifest Options section to the `--help` output
2 parents e865dca + c5f8198 commit 346b094

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/main.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,13 @@ To allow or deny a lint from the command line you can use <cyan,bold>cargo clipp
174174
You can use tool lints to allow or deny lints from your code, e.g.:
175175
176176
<yellow,bold>#[allow(clippy::needless_lifetimes)]</>
177-
"
178-
)
177+
178+
<green,bold>Manifest Options:</>
179+
<cyan,bold>--manifest-path</> <cyan><<PATH>></> Path to Cargo.toml
180+
<cyan,bold>--frozen</> Require Cargo.lock and cache are up to date
181+
<cyan,bold>--locked</> Require Cargo.lock is up to date
182+
<cyan,bold>--offline</> Run without accessing the network
183+
")
179184
}
180185
#[cfg(test)]
181186
mod tests {

0 commit comments

Comments
 (0)