diff --git a/tests/source/struct_lits.rs b/tests/source/struct_lits.rs index 216ce08099d..98ac6fab799 100644 --- a/tests/source/struct_lits.rs +++ b/tests/source/struct_lits.rs @@ -100,3 +100,14 @@ fn issue123() { Foo { a: ddddddddddddddddddddd, b: cccccccccccccccccccccccccccccccccccccc }; } + +fn issue491() { + Foo { + guard: None, + arm: 0, // Comment + }; + + Foo { + arm: 0, // Comment + }; +} diff --git a/tests/target/struct_lits.rs b/tests/target/struct_lits.rs index 445b8028340..3ece0cb23a3 100644 --- a/tests/target/struct_lits.rs +++ b/tests/target/struct_lits.rs @@ -132,3 +132,12 @@ fn issue123() { b: cccccccccccccccccccccccccccccccccccccc, }; } + +fn issue491() { + Foo { + guard: None, + arm: 0, // Comment + }; + + Foo { arm: 0 /* Comment */ }; +}