Skip to content

Commit a733b87

Browse files
committed
black-box the fn ptr, not the result
1 parent 4567f22 commit a733b87

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/test/run-pass/consts/const-ptr-nonnull.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ const DANGLING: NonNull<u32> = NonNull::dangling();
1111
const CASTED: NonNull<u32> = NonNull::cast(NonNull::<i32>::dangling());
1212

1313
pub fn main() {
14-
assert_eq!(DANGLING, b(NonNull::dangling()));
15-
assert_eq!(CASTED, b(NonNull::dangling()));
14+
assert_eq!(DANGLING, b(NonNull::dangling)());
15+
assert_eq!(CASTED, b(NonNull::dangling)());
1616
}

src/test/run-pass/consts/const-ptr-unique.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ use std::ptr::Unique;
1111
const PTR: *mut u32 = Unique::empty().as_ptr();
1212

1313
pub fn main() {
14-
assert_eq!(PTR, b(Unique::<u32>::empty()).as_ptr());
14+
assert_eq!(PTR, b(Unique::<u32>::empty)().as_ptr());
1515
}

0 commit comments

Comments
 (0)