Correct span in privacy error
Add privacy tests
auto merge of #19953 : sanxiyn/rust/privacy-span, r=alexcrichton

Fix #19062.