Fix #19734 (ICE)
Add test for issue #19734
auto merge of #19778 : aochagavia/rust/ice, r=alexcrichton

Fixes #19734