File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -217,3 +217,18 @@ fn stmt_expr_attributes() {
217217 #[ must_use]
218218 foo = false ;
219219}
220+
221+ // #3509
222+ fn issue3509 ( ) {
223+ match MyEnum {
224+ MyEnum :: Option1 if cfg ! ( target_os = "windows" ) =>
225+ #[ cfg ( target_os = "windows" ) ] {
226+ 1
227+ }
228+ }
229+ match MyEnum {
230+ MyEnum :: Option1 if cfg ! ( target_os = "windows" ) =>
231+ #[ cfg ( target_os = "windows" ) ]
232+ 1 ,
233+ }
234+ }
Original file line number Diff line number Diff line change @@ -252,3 +252,21 @@ fn stmt_expr_attributes() {
252252 #[ must_use]
253253 foo = false ;
254254}
255+
256+ // #3509
257+ fn issue3509 ( ) {
258+ match MyEnum {
259+ MyEnum :: Option1 if cfg ! ( target_os = "windows" ) =>
260+ #[ cfg ( target_os = "windows" ) ]
261+ {
262+ 1
263+ }
264+ }
265+ match MyEnum {
266+ MyEnum :: Option1 if cfg ! ( target_os = "windows" ) =>
267+ {
268+ #[ cfg( target_os = "windows" ) ]
269+ 1
270+ }
271+ }
272+ }
You can’t perform that action at this time.
0 commit comments