Function rustc_tools::cargo_integration
source · pub fn cargo_integration<T, F: Fn(&[String]) -> T>(
cargo_args: &[String],
f: F
) -> Result<T, String>
Expand description
Allows your rustc plugin to run directly with cargo integration. Quite useful in case you are writing a cargo tool.
cargo_args
is the list of extra arguments you want to pass to cargo
such as --all-targets
or -p [PACKAGE]
, etc. DO NOT PASS cargo commands like check
, build
or equivalent!