mirror of
https://github.com/clap-rs/clap
synced 2024-12-13 22:32:33 +00:00
Merge pull request #4514 from noritada/notes-on-cargo-env-vars
docs: Present other environment variable alternatives to `crate_name!`
This commit is contained in:
commit
7229047d78
1 changed files with 6 additions and 0 deletions
|
@ -85,6 +85,12 @@ macro_rules! crate_description {
|
|||
|
||||
/// Allows you to pull the name from your Cargo.toml at compile time.
|
||||
///
|
||||
/// **NOTE:** This macro extracts the name from an environment variable `CARGO_PKG_NAME`.
|
||||
/// When the crate name is set to something different from the package name,
|
||||
/// use environment variables `CARGO_CRATE_NAME` or `CARGO_BIN_NAME`.
|
||||
/// See [the Cargo Book](https://doc.rust-lang.org/cargo/reference/environment-variables.html)
|
||||
/// for more information.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
|
|
Loading…
Reference in a new issue