Closed
Description
Code
Clap has the following test at clap_derive/tests/nested.rs
:
use clap::Clap;
#[test]
fn use_option() {
macro_rules! expand_ty {
($name:ident: $ty:ty) => {
#[derive(Clap)]
struct Outer {
#[clap(short, long)]
#[allow(dead_code)]
$name: $ty,
}
};
}
expand_ty!(my_field: Option<String>);
}
As you can see from the latest master CI, it fails to compile on stable
Version it worked on
It most recently worked on: Successfully compiles and runs on 1.46.0
Version with regression
rustc --version --verbose
:
rustc 1.48.0 (7eac88abb 2020-11-16)
Metadata
Metadata
Assignees
Labels
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: Name/path resolution done by `rustc_resolve` specificallyCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustcCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleRelevant to the compiler team, which will review and decide on the PR/issue.Performance or correctness regression from one stable version to another.