Skip to content

Commit

Permalink
Allow use of deprecated std::raw in a test for that feature
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonSapin committed Apr 15, 2021
1 parent e9bd80f commit 4d683c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions library/core/tests/mem.rs
Expand Up @@ -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 {
Expand Down
4 changes: 3 additions & 1 deletion 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;
Expand Down Expand Up @@ -37,5 +40,4 @@ fn main() {

assert_eq!(b, d);
assert_eq!(c, d as usize);

}

0 comments on commit 4d683c0

Please sign in to comment.