I’ve tried to run the example under “Configuring the Parser” and get some errors. What could be my problem?

Errors

  • error: cannot find derive macro Parser in this scope
  • error: cannot find attribute command in this scope
  • error: cannot find attribute arg in this scope
  • error[E0599]: no function or associated item named parse found for struct Cli in the current scope

Cargo.toml

[package]
name = "hello_cargo"
version = "0.1.0"
edition = "2021"

[dependencies]
clap = "4.3.5"
  • cetra3
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I think you need to add derive as a feature. It’s not on by default