Allow use of deprecated std::raw in a test for that feature

This commit is contained in:
Simon Sapin 2021-04-15 09:40:00 +02:00
parent e9bd80f961
commit 4d683c0292
2 changed files with 6 additions and 1 deletions

View file

@ -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 {

View file

@ -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);
}