summary refs log tree commit diff
path: root/tests/ui/dyn-star/enum-cast.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/dyn-star/enum-cast.rs')
-rw-r--r--tests/ui/dyn-star/enum-cast.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/ui/dyn-star/enum-cast.rs b/tests/ui/dyn-star/enum-cast.rs
index 6e895e9527a..3cc7390eb12 100644
--- a/tests/ui/dyn-star/enum-cast.rs
+++ b/tests/ui/dyn-star/enum-cast.rs
@@ -3,13 +3,18 @@
 // This used to ICE, because the compiler confused a pointer-like to dyn* coercion
 // with a c-like enum to integer cast.
 
-#![feature(dyn_star)]
+#![feature(dyn_star, pointer_like_trait)]
 #![expect(incomplete_features)]
 
+use std::marker::PointerLike;
+
+#[repr(transparent)]
 enum E {
     Num(usize),
 }
 
+impl PointerLike for E {}
+
 trait Trait {}
 impl Trait for E {}