Rollup merge of #48988 - bobtwinkles:add_48070_test, r=nikomatsakis
Rollup merge of #48988 - bobtwinkles:add_48070_test, r=nikomatsakis

Add a test for #48070

Resolves #48070.
The bug itself was fixed by #48770, but that PR didn't add a test for it.

r? @nikomatsakis

GBGamer/rust,graydon/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,graydon/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,aidancully/rust