mirror of
https://gitee.com/openharmony/third_party_rust_cxx
synced 2024-12-04 13:27:15 +00:00
9 lines
221 B
Rust
9 lines
221 B
Rust
|
use cxx::{CxxString, UniquePtr};
|
||
|
|
||
|
#[test]
|
||
|
#[should_panic = "called deref on a null UniquePtr<CxxString>"]
|
||
|
fn test_deref_null() {
|
||
|
let unique_ptr = UniquePtr::<CxxString>::null();
|
||
|
let _: &CxxString = &unique_ptr;
|
||
|
}
|