Undocumented/unintended that doc comment strings can contain format arguments
shepmaster opened this issue · 0 comments
shepmaster commented
/// a. {this_is_not_ok}
#[derive(argh::FromArgs)]
struct Demo {
/// b. {nor_is_this}
#[argh(option)]
value: u8,
}
[dependencies]
argh = "0.1.7"
error: there is no argument named `this_is_not_ok`
--> src/main.rs:2:10
|
2 | #[derive(argh::FromArgs)]
| ^^^^^^^^^^^^^^
|
= note: did you intend to capture a variable `this_is_not_ok` from the surrounding scope?
= note: to avoid ambiguity, `format_args!` cannot capture variables when the format string is expanded from a macro
= note: this error originates in the derive macro `argh::FromArgs` (in Nightly builds, run with -Z macro-backtrace for more info)
error: there is no argument named `nor_is_this`
--> src/main.rs:2:10
|
2 | #[derive(argh::FromArgs)]
| ^^^^^^^^^^^^^^
|
= note: did you intend to capture a variable `nor_is_this` from the surrounding scope?
= note: to avoid ambiguity, `format_args!` cannot capture variables when the format string is expanded from a macro
= note: this error originates in the derive macro `argh::FromArgs` (in Nightly builds, run with -Z macro-backtrace for more info)