Register snapshots.

Closes #16880.
auto merge of #17063 : huonw/rust/snap, r=alexcrichton

Closes #16880.