From 4d683c0292500738c80ba8824dfaf4d3a0df4ba0 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Thu, 15 Apr 2021 09:40:00 +0200 Subject: [PATCH] Allow use of deprecated std::raw in a test for that feature --- library/core/tests/mem.rs | 3 +++ src/test/ui/cast/fat-ptr-cast-rpass.rs | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/library/core/tests/mem.rs b/library/core/tests/mem.rs index c0b75036f4f..dfdbc9305d2 100644 --- a/library/core/tests/mem.rs +++ b/library/core/tests/mem.rs @@ -97,6 +97,9 @@ fn test_transmute_copy() { assert_eq!(1, unsafe { transmute_copy(&1) }); } +// Remove this test when `std::raw` is removed. +// The replacement pointer metadata APIs are tested in library/core/tests/ptr.rs +#[allow(deprecated)] #[test] fn test_transmute() { trait Foo { diff --git a/src/test/ui/cast/fat-ptr-cast-rpass.rs b/src/test/ui/cast/fat-ptr-cast-rpass.rs index 5f5e621d762..9fa2255e1b3 100644 --- a/src/test/ui/cast/fat-ptr-cast-rpass.rs +++ b/src/test/ui/cast/fat-ptr-cast-rpass.rs @@ -1,5 +1,8 @@ // run-pass +// Remove this file when `std::raw` is removed. +// The replacement pointer metadata APIs are tested in library/core/tests/ptr.rs +#![allow(deprecated)] #![feature(raw)] use std::mem; @@ -37,5 +40,4 @@ fn main() { assert_eq!(b, d); assert_eq!(c, d as usize); - }