diff options
Diffstat (limited to 'tests/ui/lint/internal/higher-ranked-query-instability.rs')
| -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::<()>(); +} |
