summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/raw-ptr-const-param-deref.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/const-generics/raw-ptr-const-param-deref.rs')
-rw-r--r--src/test/ui/const-generics/raw-ptr-const-param-deref.rs21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/test/ui/const-generics/raw-ptr-const-param-deref.rs b/src/test/ui/const-generics/raw-ptr-const-param-deref.rs
deleted file mode 100644
index 65595f07d..000000000
--- a/src/test/ui/const-generics/raw-ptr-const-param-deref.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-// Checks that pointers must not be used as the type of const params.
-// revisions: full min
-
-#![cfg_attr(full, feature(adt_const_params))]
-#![cfg_attr(full, allow(incomplete_features))]
-
-const A: u32 = 3;
-
-struct Const<const P: *const u32>; //~ ERROR: using raw pointers as const generic parameters
-
-impl<const P: *const u32> Const<P> { //~ ERROR: using raw pointers as const generic parameters
- fn get() -> u32 {
- unsafe {
- *P
- }
- }
-}
-
-fn main() {
- assert_eq!(Const::<{&A as *const _}>::get(), 3)
-}