summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/in-trait/default-method-binder-shifting.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/impl-trait/in-trait/default-method-binder-shifting.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/ui/impl-trait/in-trait/default-method-binder-shifting.rs b/tests/ui/impl-trait/in-trait/default-method-binder-shifting.rs
new file mode 100644
index 000000000..de82544f2
--- /dev/null
+++ b/tests/ui/impl-trait/in-trait/default-method-binder-shifting.rs
@@ -0,0 +1,22 @@
+// check-pass
+// [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 Trait {
+ type Type;
+
+ // Check that we're adjusting bound vars correctly when installing the default
+ // method projection assumptions.
+ fn method(&self) -> impl Trait<Type = impl Sized + '_>;
+}
+
+trait Trait2 {
+ type Type;
+
+ fn method(&self) -> impl Trait2<Type = impl Trait2<Type = impl Sized + '_> + '_>;
+}
+
+fn main() {}