remove die definition and use in doc tests
auto merge of #4941 : nickdesaulniers/rust/issue4524cleanup, r=catamorphism

review? @brson
Issue #4524