summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/non_lifetime_binders/method-probe.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/traits/non_lifetime_binders/method-probe.rs')
-rw-r--r--tests/ui/traits/non_lifetime_binders/method-probe.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/traits/non_lifetime_binders/method-probe.rs b/tests/ui/traits/non_lifetime_binders/method-probe.rs
new file mode 100644
index 000000000..8df240c20
--- /dev/null
+++ b/tests/ui/traits/non_lifetime_binders/method-probe.rs
@@ -0,0 +1,16 @@
+// check-pass
+
+#![feature(non_lifetime_binders)]
+//~^ WARN the feature `non_lifetime_binders` is incomplete
+
+trait Foo: for<T> Bar<T> {}
+
+trait Bar<T> {
+ fn method() -> T;
+}
+
+fn x<T: Foo>() {
+ let _: i32 = T::method();
+}
+
+fn main() {}