about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-01-13 23:08:22 +0000
committerMichael Goulet <michael@errs.io>2024-01-13 23:09:37 +0000
commit985e1e031b0d9d7c54812931c2beb57b0d304a94 (patch)
tree4d94f927a704be1ea00c1a84588fe17fd4eb0e2c
parent24c1f4aa802bc6b9c3710baa4464e691b5b13bb2 (diff)
downloadrust-985e1e031b0d9d7c54812931c2beb57b0d304a94.tar.gz
rust-985e1e031b0d9d7c54812931c2beb57b0d304a94.zip
Add a simpler test
-rw-r--r--tests/ui/traits/non_lifetime_binders/unifying-placeholders-in-query-response-2.current.stderr11
-rw-r--r--tests/ui/traits/non_lifetime_binders/unifying-placeholders-in-query-response-2.next.stderr11
-rw-r--r--tests/ui/traits/non_lifetime_binders/unifying-placeholders-in-query-response-2.rs23
3 files changed, 45 insertions, 0 deletions
diff --git a/tests/ui/traits/non_lifetime_binders/unifying-placeholders-in-query-response-2.current.stderr b/tests/ui/traits/non_lifetime_binders/unifying-placeholders-in-query-response-2.current.stderr
new file mode 100644
index 00000000000..4082d6d47e7
--- /dev/null
+++ b/tests/ui/traits/non_lifetime_binders/unifying-placeholders-in-query-response-2.current.stderr
@@ -0,0 +1,11 @@
+warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/unifying-placeholders-in-query-response-2.rs:5:12
+   |
+LL | #![feature(non_lifetime_binders)]
+   |            ^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information
+   = note: `#[warn(incomplete_features)]` on by default
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/traits/non_lifetime_binders/unifying-placeholders-in-query-response-2.next.stderr b/tests/ui/traits/non_lifetime_binders/unifying-placeholders-in-query-response-2.next.stderr
new file mode 100644
index 00000000000..4082d6d47e7
--- /dev/null
+++ b/tests/ui/traits/non_lifetime_binders/unifying-placeholders-in-query-response-2.next.stderr
@@ -0,0 +1,11 @@
+warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/unifying-placeholders-in-query-response-2.rs:5:12
+   |
+LL | #![feature(non_lifetime_binders)]
+   |            ^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information
+   = note: `#[warn(incomplete_features)]` on by default
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/traits/non_lifetime_binders/unifying-placeholders-in-query-response-2.rs b/tests/ui/traits/non_lifetime_binders/unifying-placeholders-in-query-response-2.rs
new file mode 100644
index 00000000000..bbf1a1f72db
--- /dev/null
+++ b/tests/ui/traits/non_lifetime_binders/unifying-placeholders-in-query-response-2.rs
@@ -0,0 +1,23 @@
+// revisions: current next
+//[next] compile-flags: -Znext-solver
+// check-pass
+
+#![feature(non_lifetime_binders)]
+//~^ WARN the feature `non_lifetime_binders` is incomplete
+
+trait Id {
+    type Output: ?Sized;
+}
+
+impl<T: ?Sized> Id for T {
+    type Output = T;
+}
+
+trait Everyone {}
+impl<T: ?Sized> Everyone for T {}
+
+fn hello() where for<T> <T as Id>::Output: Everyone {}
+
+fn main() {
+    hello();
+}