Skip to content

Commit 536eb97

Browse files
committed
Adjust tests for newly added unclear_fat_pointer_comparisons lint
1 parent d875d16 commit 536eb97

File tree

5 files changed

+8
-1
lines changed

5 files changed

+8
-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

src/tools/miri/tests/pass/pointers.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
//@[tree]compile-flags: -Zmiri-tree-borrows
33
//@compile-flags: -Zmiri-permissive-provenance
44
#![feature(ptr_metadata, const_raw_ptr_comparison)]
5+
#![allow(unclear_fat_pointer_comparisons)]
56

67
use std::mem::{self, transmute};
78
use std::ptr;

src/tools/miri/tests/pass/rc.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
//@compile-flags: -Zmiri-strict-provenance
44
#![feature(new_uninit)]
55
#![feature(get_mut_unchecked)]
6+
#![allow(unclear_fat_pointer_comparisons)]
67

78
use std::cell::{Cell, RefCell};
89
use std::fmt::Debug;

tests/ui/issues/issue-17336.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
// build-pass
2+
23
#![allow(unused_must_use)]
4+
#![allow(unclear_fat_pointer_comparisons)]
5+
36
#[allow(dead_code)]
47
fn check(a: &str) {
58
let x = a as *const str;

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(unclear_fat_pointer_comparisons)]
57

68
use std::mem;
79

0 commit comments

Comments
 (0)