summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.rs')
-rw-r--r--tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.rs b/tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.rs
new file mode 100644
index 000000000..8329ce1f8
--- /dev/null
+++ b/tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.rs
@@ -0,0 +1,19 @@
+// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
+// revisions: current next
+
+#![feature(return_position_impl_trait_in_trait)]
+//~^ WARN the feature `return_position_impl_trait_in_trait` is incomplete
+
+trait MyTrait {
+ fn foo(&self) -> impl Sized;
+ fn bar(&self) -> impl Sized;
+}
+
+impl MyTrait for i32 {
+ //~^ ERROR not all trait items implemented, missing: `foo`
+ fn bar(&self) -> impl Sized {
+ self.foo()
+ }
+}
+
+fn main() {}