From fee07534bbe192befadb03b1626c2bbf3d6e5cfb Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Mon, 2 Jul 2018 19:59:39 +0200 Subject: Add feature gate checks --- src/test/ui/error-codes/E0396.rs | 2 ++ src/test/ui/error-codes/E0396.stderr | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src/test/ui/error-codes') diff --git a/src/test/ui/error-codes/E0396.rs b/src/test/ui/error-codes/E0396.rs index 6434620d26a..1ee8a74a465 100644 --- a/src/test/ui/error-codes/E0396.rs +++ b/src/test/ui/error-codes/E0396.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// gate-test-const_raw_ptr_deref + const REG_ADDR: *const u8 = 0x5f3759df as *const u8; const VALUE: u8 = unsafe { *REG_ADDR }; diff --git a/src/test/ui/error-codes/E0396.stderr b/src/test/ui/error-codes/E0396.stderr index 70331acc0e9..a2a2e724358 100644 --- a/src/test/ui/error-codes/E0396.stderr +++ b/src/test/ui/error-codes/E0396.stderr @@ -1,5 +1,5 @@ error[E0658]: dereferencing raw pointers in constants is unstable (see issue #51911) - --> $DIR/E0396.rs:13:28 + --> $DIR/E0396.rs:15:28 | LL | const VALUE: u8 = unsafe { *REG_ADDR }; | ^^^^^^^^^ -- cgit 1.4.1-3-g733a5