diff --git a/compiler/rustc_codegen_cranelift/example/mini_core.rs b/compiler/rustc_codegen_cranelift/example/mini_core.rs index 934e4b1786f..3607b7cd944 100644 --- a/compiler/rustc_codegen_cranelift/example/mini_core.rs +++ b/compiler/rustc_codegen_cranelift/example/mini_core.rs @@ -11,7 +11,7 @@ thread_local )] #![no_core] -#![allow(dead_code, internal_features)] +#![allow(dead_code, internal_features, ambiguous_wide_pointer_comparisons)] #[lang = "sized"] pub trait Sized {} diff --git a/library/alloc/tests/vec.rs b/library/alloc/tests/vec.rs index 81de7085e09..9003963300f 100644 --- a/library/alloc/tests/vec.rs +++ b/library/alloc/tests/vec.rs @@ -1974,7 +1974,7 @@ fn vec_macro_repeating_null_raw_fat_pointer() { let vec = vec![null_raw_dyn; 1]; dbg!(ptr_metadata(vec[0])); - assert!(vec[0] == null_raw_dyn); + assert!(std::ptr::eq(vec[0], null_raw_dyn)); // Polyfill for https://github.com/rust-lang/rfcs/pull/2580 diff --git a/src/tools/miri/tests/pass/pointers.rs b/src/tools/miri/tests/pass/pointers.rs index 1525ded6151..c7b720dafa2 100644 --- a/src/tools/miri/tests/pass/pointers.rs +++ b/src/tools/miri/tests/pass/pointers.rs @@ -2,6 +2,7 @@ //@[tree]compile-flags: -Zmiri-tree-borrows //@compile-flags: -Zmiri-permissive-provenance #![feature(ptr_metadata, const_raw_ptr_comparison)] +#![allow(ambiguous_wide_pointer_comparisons)] use std::mem::{self, transmute}; use std::ptr; diff --git a/src/tools/miri/tests/pass/rc.rs b/src/tools/miri/tests/pass/rc.rs index 6375abcd232..6dd1b3aff9e 100644 --- a/src/tools/miri/tests/pass/rc.rs +++ b/src/tools/miri/tests/pass/rc.rs @@ -3,6 +3,7 @@ //@compile-flags: -Zmiri-strict-provenance #![feature(new_uninit)] #![feature(get_mut_unchecked)] +#![allow(ambiguous_wide_pointer_comparisons)] use std::cell::{Cell, RefCell}; use std::fmt::Debug; diff --git a/tests/ui/issues/issue-17336.rs b/tests/ui/issues/issue-17336.rs index 89ce59b11f2..97782ff9f0e 100644 --- a/tests/ui/issues/issue-17336.rs +++ b/tests/ui/issues/issue-17336.rs @@ -1,5 +1,8 @@ // build-pass + #![allow(unused_must_use)] +#![allow(ambiguous_wide_pointer_comparisons)] + #[allow(dead_code)] fn check(a: &str) { let x = a as *const str; diff --git a/tests/ui/mir/mir_raw_fat_ptr.rs b/tests/ui/mir/mir_raw_fat_ptr.rs index 6aceefbe715..f4a9afd2308 100644 --- a/tests/ui/mir/mir_raw_fat_ptr.rs +++ b/tests/ui/mir/mir_raw_fat_ptr.rs @@ -1,7 +1,9 @@ // run-pass // check raw fat pointer ops in mir // FIXME: please improve this when we get monomorphization support + #![feature(raw_ref_op)] +#![allow(ambiguous_wide_pointer_comparisons)] use std::mem;