1 | pub(super) fn abort(s: &str) -> ! { |
---|---|
2 | struct DoublePanic; |
3 | |
4 | impl Drop for DoublePanic { |
5 | fn drop(&mut self) { |
6 | panic!("panicking twice to abort the program"); |
7 | } |
8 | } |
9 | |
10 | let _bomb: DoublePanic = DoublePanic; |
11 | panic!("{}", s); |
12 | } |
13 |