Add a test for #3509
This commit is contained in:
parent
09940a70d0
commit
0d4fb2403c
@ -217,3 +217,18 @@ fn stmt_expr_attributes() {
|
||||
#[must_use]
|
||||
foo = false ;
|
||||
}
|
||||
|
||||
// #3509
|
||||
fn issue3509() {
|
||||
match MyEnum {
|
||||
MyEnum::Option1 if cfg!(target_os = "windows") =>
|
||||
#[cfg(target_os = "windows")]{
|
||||
1
|
||||
}
|
||||
}
|
||||
match MyEnum {
|
||||
MyEnum::Option1 if cfg!(target_os = "windows") =>
|
||||
#[cfg(target_os = "windows")]
|
||||
1,
|
||||
}
|
||||
}
|
||||
|
@ -252,3 +252,21 @@ fn stmt_expr_attributes() {
|
||||
#[must_use]
|
||||
foo = false;
|
||||
}
|
||||
|
||||
// #3509
|
||||
fn issue3509() {
|
||||
match MyEnum {
|
||||
MyEnum::Option1 if cfg!(target_os = "windows") =>
|
||||
#[cfg(target_os = "windows")]
|
||||
{
|
||||
1
|
||||
}
|
||||
}
|
||||
match MyEnum {
|
||||
MyEnum::Option1 if cfg!(target_os = "windows") =>
|
||||
{
|
||||
#[cfg(target_os = "windows")]
|
||||
1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user