Adjust tests for newly added ambiguous_wide_pointer_comparisons lint
This commit is contained in:
parent
30c7b18d25
commit
5e1bfb538f
@ -11,7 +11,7 @@
|
|||||||
thread_local
|
thread_local
|
||||||
)]
|
)]
|
||||||
#![no_core]
|
#![no_core]
|
||||||
#![allow(dead_code, internal_features)]
|
#![allow(dead_code, internal_features, ambiguous_wide_pointer_comparisons)]
|
||||||
|
|
||||||
#[lang = "sized"]
|
#[lang = "sized"]
|
||||||
pub trait Sized {}
|
pub trait Sized {}
|
||||||
|
@ -1974,7 +1974,7 @@ fn vec_macro_repeating_null_raw_fat_pointer() {
|
|||||||
|
|
||||||
let vec = vec![null_raw_dyn; 1];
|
let vec = vec![null_raw_dyn; 1];
|
||||||
dbg!(ptr_metadata(vec[0]));
|
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
|
// Polyfill for https://github.com/rust-lang/rfcs/pull/2580
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
//@[tree]compile-flags: -Zmiri-tree-borrows
|
//@[tree]compile-flags: -Zmiri-tree-borrows
|
||||||
//@compile-flags: -Zmiri-permissive-provenance
|
//@compile-flags: -Zmiri-permissive-provenance
|
||||||
#![feature(ptr_metadata, const_raw_ptr_comparison)]
|
#![feature(ptr_metadata, const_raw_ptr_comparison)]
|
||||||
|
#![allow(ambiguous_wide_pointer_comparisons)]
|
||||||
|
|
||||||
use std::mem::{self, transmute};
|
use std::mem::{self, transmute};
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
//@compile-flags: -Zmiri-strict-provenance
|
//@compile-flags: -Zmiri-strict-provenance
|
||||||
#![feature(new_uninit)]
|
#![feature(new_uninit)]
|
||||||
#![feature(get_mut_unchecked)]
|
#![feature(get_mut_unchecked)]
|
||||||
|
#![allow(ambiguous_wide_pointer_comparisons)]
|
||||||
|
|
||||||
use std::cell::{Cell, RefCell};
|
use std::cell::{Cell, RefCell};
|
||||||
use std::fmt::Debug;
|
use std::fmt::Debug;
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
// build-pass
|
// build-pass
|
||||||
|
|
||||||
#![allow(unused_must_use)]
|
#![allow(unused_must_use)]
|
||||||
|
#![allow(ambiguous_wide_pointer_comparisons)]
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
fn check(a: &str) {
|
fn check(a: &str) {
|
||||||
let x = a as *const str;
|
let x = a as *const str;
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
// run-pass
|
// run-pass
|
||||||
// check raw fat pointer ops in mir
|
// check raw fat pointer ops in mir
|
||||||
// FIXME: please improve this when we get monomorphization support
|
// FIXME: please improve this when we get monomorphization support
|
||||||
|
|
||||||
#![feature(raw_ref_op)]
|
#![feature(raw_ref_op)]
|
||||||
|
#![allow(ambiguous_wide_pointer_comparisons)]
|
||||||
|
|
||||||
use std::mem;
|
use std::mem;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user