| David Tolnay | 05aa672 | 2020-12-29 15:06:36 -0800 | [diff] [blame] | 1 | #![allow(clippy::let_underscore_drop)] |
| 2 | |||||
| David Tolnay | b5609f8 | 2020-04-09 23:44:23 -0700 | [diff] [blame] | 3 | use cxx::{CxxString, UniquePtr}; |
| 4 | |||||
| 5 | #[test] | ||||
| 6 | #[should_panic = "called deref on a null UniquePtr<CxxString>"] | ||||
| 7 | fn test_deref_null() { | ||||
| 8 | let unique_ptr = UniquePtr::<CxxString>::null(); | ||||
| 9 | let _: &CxxString = &unique_ptr; | ||||
| 10 | } | ||||