Skip to content

Commit 7b01e08

Browse files
committed
test: Smoke test fmt::Pointer
1 parent 9b6939b commit 7b01e08

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#![feature(libc)]
2+
extern crate libc;
3+
use std::ptr;
4+
use std::rc::Rc;
5+
use std::sync::Arc;
6+
7+
fn main() {
8+
let p: *const libc::c_void = ptr::null();
9+
let rc = Rc::new(1usize);
10+
let arc = Arc::new(1usize);
11+
let b = Box::new("hi");
12+
13+
let _ = format!("{:p}{:p}{:p}",
14+
rc, arc, b);
15+
16+
assert_eq!(format!("{:p}", p),
17+
"0x0");
18+
}

0 commit comments

Comments
 (0)