rename-unique: Rename Unique::empty() to Unique::dangling()

rename-unique: Change calls and doc in raw_vec.rs

rename-unique: Change empty() -> dangling() in const-ptr-unique-rpass.rs
This commit is contained in:
cohenarthur 2020-04-30 11:00:45 +02:00
parent 7c8dbd969d
commit eda7f8fdff
3 changed files with 8 additions and 9 deletions

View file

@ -8,9 +8,9 @@ use test::black_box as b; // prevent promotion of the argument and const-propaga
use std::ptr::Unique;
const PTR: *mut u32 = Unique::empty().as_ptr();
const PTR: *mut u32 = Unique::dangling().as_ptr();
pub fn main() {
// Be super-extra paranoid and cast the fn items to fn pointers before blackboxing them.
assert_eq!(PTR, b::<fn() -> _>(Unique::<u32>::empty)().as_ptr());
assert_eq!(PTR, b::<fn() -> _>(Unique::<u32>::dangling)().as_ptr());
}