summaryrefslogtreecommitdiffstats
path: root/tests/ui/dyn-star/check-size-at-cast-polymorphic.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/dyn-star/check-size-at-cast-polymorphic.rs')
-rw-r--r--tests/ui/dyn-star/check-size-at-cast-polymorphic.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/dyn-star/check-size-at-cast-polymorphic.rs b/tests/ui/dyn-star/check-size-at-cast-polymorphic.rs
new file mode 100644
index 000000000..5c0a3d256
--- /dev/null
+++ b/tests/ui/dyn-star/check-size-at-cast-polymorphic.rs
@@ -0,0 +1,16 @@
+// check-pass
+
+#![feature(dyn_star)]
+#![allow(incomplete_features)]
+
+use std::fmt::Debug;
+
+fn dyn_debug(_: (dyn* Debug + '_)) {
+
+}
+
+fn polymorphic<T: Debug>(t: &T) {
+ dyn_debug(t);
+}
+
+fn main() {}