about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2025-08-20 16:49:04 +0000
committerMichael Goulet <michael@errs.io>2025-08-20 16:49:35 +0000
commitd18d94d8a0416f9013ad6e59ffae3d9e57382add (patch)
treee4cfdc6166488c0824427e62848c519ececc1acd /tests
parente8a792daf500b5ff8097896ddb6cc037abe92487 (diff)
downloadrust-d18d94d8a0416f9013ad6e59ffae3d9e57382add.tar.gz
rust-d18d94d8a0416f9013ad6e59ffae3d9e57382add.zip
Instantiate higher-ranked binder with erased when checking IntoIterator predicate query instability
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/lint/internal/higher-ranked-query-instability.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/lint/internal/higher-ranked-query-instability.rs b/tests/ui/lint/internal/higher-ranked-query-instability.rs
new file mode 100644
index 00000000000..4407baac0c6
--- /dev/null
+++ b/tests/ui/lint/internal/higher-ranked-query-instability.rs
@@ -0,0 +1,11 @@
+//@ check-pass
+//@ compile-flags: -Zunstable-options
+
+// Make sure we don't try to resolve instances for trait refs that have escaping
+// bound vars when computing the query instability lint.
+
+fn foo<T>() where for<'a> &'a [T]: IntoIterator<Item = &'a T> {}
+
+fn main() {
+    foo::<()>();
+}