You can find the answer in testing section of the Rust book. More specifically, you want #[should_panic] attribute:
確定! 回上一頁