Skip to content

Commit fcf88b8

Browse files
committed
coretest: Ensure that pointer formatting flags are cleaned up
1 parent 5aaa606 commit fcf88b8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/libcoretest/fmt/mod.rs

+7
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,10 @@
99
// except according to those terms.
1010

1111
mod num;
12+
13+
#[test]
14+
fn test_format_flags() {
15+
// No residual flags left by pointer formatting
16+
let p = "".as_ptr();
17+
assert_eq!(format!("{:p} {:x}", p, 16u), format!("{:p} 10", p));
18+
}

0 commit comments

Comments
 (0)