Signed-off-by: hmz007 <hmz007@gmail.com> Change-Id: Ib87fdbe7a0be7dc961af3500fe9ea4589a127f9f
11 lines
261 B
Rust
11 lines
261 B
Rust
#![allow(clippy::let_underscore_drop)]
|
|
|
|
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;
|
|
}
|