Skip to content

#[argh(description = "...")] only supports literal #163

@stackinspector

Description

@stackinspector
#[derive(argh::FromArgs)]
#[argh(description = env!("GIT_HASH"))]
struct Args {}
error: expected literal
 --> arghdesc.rs:2:22
  |
2 | #[argh(description = env!("GIT_HASH"))]
  |                      ^^^

error: #[derive(FromArgs)] type with no description.
       Add a doc comment or an `#[argh(description = "...")]` attribute.
 --> arghdesc.rs:1:10
  |
1 | #[derive(argh::FromArgs)]
  |          ^^^^^^^^^^^^^^
  |
  = note: this error originates in the derive macro `argh::FromArgs` (in Nightly builds, run with -Z macro-backtrace for more info)

error: #[derive(FromArgs)] type with no description.
       Add a doc comment or an `#[argh(description = "...")]` attribute.
 --> arghdesc.rs:3:8
  |
3 | struct Args {}
  |        ^^^^

error: could not compile `snippets` due to 3 previous errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions