enable fuzzy_provenance_casts in libcore+tests
This commit is contained in:
parent
2bb28c174b
commit
428ab59fb7
5 changed files with 7 additions and 0 deletions
|
@ -89,6 +89,7 @@
|
|||
// Lints:
|
||||
#![deny(rust_2021_incompatible_or_patterns)]
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
#![deny(fuzzy_provenance_casts)]
|
||||
#![warn(deprecated_in_future)]
|
||||
#![warn(missing_debug_implementations)]
|
||||
#![warn(missing_docs)]
|
||||
|
@ -162,6 +163,7 @@
|
|||
#![feature(slice_ptr_get)]
|
||||
#![feature(slice_split_at_unchecked)]
|
||||
#![feature(str_internals)]
|
||||
#![feature(strict_provenance)]
|
||||
#![feature(utf16_extra)]
|
||||
#![feature(utf16_extra_const)]
|
||||
#![feature(variant_count)]
|
||||
|
|
|
@ -140,6 +140,7 @@ impl<T: ?Sized> *const T {
|
|||
/// assert_eq!(<*const u8>::from_bits(1), dangling);
|
||||
/// ```
|
||||
#[unstable(feature = "ptr_to_from_bits", issue = "91126")]
|
||||
#[allow(fuzzy_provenance_casts)] // this is an unstable and semi-deprecated cast function
|
||||
pub fn from_bits(bits: usize) -> Self
|
||||
where
|
||||
T: Sized,
|
||||
|
|
|
@ -616,6 +616,7 @@ pub const fn invalid_mut<T>(addr: usize) -> *mut T {
|
|||
#[inline]
|
||||
#[unstable(feature = "strict_provenance", issue = "95228")]
|
||||
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
||||
#[allow(fuzzy_provenance_casts)] // this *is* the strict provenance API one should use instead
|
||||
pub fn from_exposed_addr<T>(addr: usize) -> *const T
|
||||
where
|
||||
T: Sized,
|
||||
|
@ -653,6 +654,7 @@ where
|
|||
#[inline]
|
||||
#[unstable(feature = "strict_provenance", issue = "95228")]
|
||||
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
||||
#[allow(fuzzy_provenance_casts)] // this *is* the strict provenance API one should use instead
|
||||
pub fn from_exposed_addr_mut<T>(addr: usize) -> *mut T
|
||||
where
|
||||
T: Sized,
|
||||
|
|
|
@ -146,6 +146,7 @@ impl<T: ?Sized> *mut T {
|
|||
/// assert_eq!(<*mut u8>::from_bits(1), dangling);
|
||||
/// ```
|
||||
#[unstable(feature = "ptr_to_from_bits", issue = "91126")]
|
||||
#[allow(fuzzy_provenance_casts)] // this is an unstable and semi-deprecated cast function
|
||||
pub fn from_bits(bits: usize) -> Self
|
||||
where
|
||||
T: Sized,
|
||||
|
|
|
@ -109,6 +109,7 @@
|
|||
#![feature(utf8_chunks)]
|
||||
#![feature(is_ascii_octdigit)]
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
#![deny(fuzzy_provenance_casts)]
|
||||
|
||||
extern crate test;
|
||||
|
||||
|
|
Loading…
Reference in a new issue