diff options
| author | Michael Goulet <michael@errs.io> | 2025-08-20 16:49:04 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-08-20 16:49:35 +0000 |
| commit | d18d94d8a0416f9013ad6e59ffae3d9e57382add (patch) | |
| tree | e4cfdc6166488c0824427e62848c519ececc1acd /tests/ui/lint | |
| parent | e8a792daf500b5ff8097896ddb6cc037abe92487 (diff) | |
| download | rust-d18d94d8a0416f9013ad6e59ffae3d9e57382add.tar.gz rust-d18d94d8a0416f9013ad6e59ffae3d9e57382add.zip | |
Instantiate higher-ranked binder with erased when checking IntoIterator predicate query instability
Diffstat (limited to 'tests/ui/lint')
| -rw-r--r-- | tests/ui/lint/internal/higher-ranked-query-instability.rs | 11 |
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::<()>(); +} |
