]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass/consts/const-ptr-unique.rs
remove useless ident() functions in const tests and replace the useful ones by black_...
[rust.git] / src / test / run-pass / consts / const-ptr-unique.rs
1 // run-pass
2
3 #![feature(ptr_internals, test)]
4
5 extern crate test;
6 use test::black_box as b; // prevent promotion of the argument and const-propagation of the result
7
8 use std::ptr::Unique;
9
10
11 const PTR: *mut u32 = Unique::empty().as_ptr();
12
13 pub fn main() {
14     assert_eq!(PTR, b(Unique::<u32>::empty()).as_ptr());
15 }