Skip to content

Commit 3da2841

Browse files
committed
Adjust tests for invalid_pointer_trait_comparisons
1 parent e3974cf commit 3da2841

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

library/alloc/tests/vec.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1933,7 +1933,7 @@ fn vec_macro_repeating_null_raw_fat_pointer() {
19331933

19341934
let vec = vec![null_raw_dyn; 1];
19351935
dbg!(ptr_metadata(vec[0]));
1936-
assert!(vec[0] == null_raw_dyn);
1936+
assert!(std::ptr::eq(vec[0], null_raw_dyn));
19371937

19381938
// Polyfill for https://github.com/rust-lang/rfcs/pull/2580
19391939

tests/ui/mir/mir_raw_fat_ptr.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
// run-pass
22
// check raw fat pointer ops in mir
33
// FIXME: please improve this when we get monomorphization support
4+
45
#![feature(raw_ref_op)]
6+
#![allow(invalid_pointer_trait_comparisons)]
57

68
use std::mem;
79

0 commit comments

Comments
 (0)