summaryrefslogtreecommitdiffstats
path: root/tests/ui/lazy-type-alias/coerce-behind-lazy.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/lazy-type-alias/coerce-behind-lazy.rs')
-rw-r--r--tests/ui/lazy-type-alias/coerce-behind-lazy.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/lazy-type-alias/coerce-behind-lazy.rs b/tests/ui/lazy-type-alias/coerce-behind-lazy.rs
new file mode 100644
index 000000000..745eadb96
--- /dev/null
+++ b/tests/ui/lazy-type-alias/coerce-behind-lazy.rs
@@ -0,0 +1,16 @@
+// check-pass
+// revisions: current next
+//[next] compile-flags: -Ztrait-solver=next
+
+#![feature(lazy_type_alias)]
+//~^ WARN the feature `lazy_type_alias` is incomplete
+
+use std::any::Any;
+
+type Coerce = Box<dyn Any>;
+
+fn test() -> Coerce {
+ Box::new(1)
+}
+
+fn main() {}