4 // === CDB TESTS ==================================================================================
8 // cdb-command: dx nonnull
9 // cdb-check:nonnull : NonNull(0x[...]: 0xc) [Type: core::ptr::non_null::NonNull<u32>]
10 // cdb-check: [<Raw View>] [Type: core::ptr::non_null::NonNull<u32>]
11 // cdb-check: 0xc [Type: unsigned int]
13 // cdb-command: dx manuallydrop
14 // cdb-check:manuallydrop : 12345 [Type: core::mem::manually_drop::ManuallyDrop<i32>]
15 // cdb-check: [<Raw View>] [Type: core::mem::manually_drop::ManuallyDrop<i32>]
17 // cdb-command: dx pin
18 // cdb-check:pin : Pin(0x[...]: "this") [Type: core::pin::Pin<ref_mut$<alloc::string::String> >]
19 // cdb-check: [<Raw View>] [Type: core::pin::Pin<ref_mut$<alloc::string::String> >]
20 // cdb-check: [len] : 0x4 [Type: unsigned [...]]
21 // cdb-check: [capacity] : 0x4 [Type: unsigned [...]]
22 // cdb-check: [chars] : "this"
24 // cdb-command: dx unique
25 // cdb-check:unique : Unique(0x[...]: (0x2a, 4321)) [Type: core::ptr::unique::Unique<tuple$<u64,i32> >]
26 // cdb-check: [<Raw View>] [Type: core::ptr::unique::Unique<tuple$<u64,i32> >]
27 // cdb-check: [0] : 0x2a [Type: unsigned __int64]
28 // cdb-check: [1] : 4321 [Type: int]
30 #![feature(ptr_internals)]
32 use std::mem::ManuallyDrop;
34 use std::ptr::{NonNull, Unique};
37 let nonnull: NonNull<_> = (&12u32).into();
39 let manuallydrop = ManuallyDrop::new(12345i32);
41 let mut s = "this".to_string();
42 let pin = Pin::new(&mut s);
44 let unique: Unique<_> = (&mut (42u64, 4321i32)).into();