summaryrefslogtreecommitdiffstats
path: root/src/test/ui/dyn-star/box.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/dyn-star/box.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/ui/dyn-star/box.rs b/src/test/ui/dyn-star/box.rs
new file mode 100644
index 000000000..d1f1819d9
--- /dev/null
+++ b/src/test/ui/dyn-star/box.rs
@@ -0,0 +1,17 @@
+// run-pass
+// compile-flags: -C opt-level=0
+
+#![feature(dyn_star)]
+#![allow(incomplete_features)]
+
+use std::fmt::Display;
+
+fn make_dyn_star() -> dyn* Display {
+ Box::new(42) as dyn* Display
+}
+
+fn main() {
+ let x = make_dyn_star();
+
+ println!("{x}");
+}