summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/in-trait/deep-match.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/impl-trait/in-trait/deep-match.rs')
-rw-r--r--tests/ui/impl-trait/in-trait/deep-match.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/impl-trait/in-trait/deep-match.rs b/tests/ui/impl-trait/in-trait/deep-match.rs
new file mode 100644
index 000000000..a6385147c
--- /dev/null
+++ b/tests/ui/impl-trait/in-trait/deep-match.rs
@@ -0,0 +1,15 @@
+#![feature(return_position_impl_trait_in_trait)]
+#![allow(incomplete_features)]
+
+struct Wrapper<T>(T);
+
+trait Foo {
+ fn bar() -> Wrapper<impl Sized>;
+}
+
+impl Foo for () {
+ fn bar() -> i32 { 0 }
+ //~^ ERROR method `bar` has an incompatible return type for trait
+}
+
+fn main() {}