diff options
| author | Michael Goulet <michael@errs.io> | 2023-01-31 21:22:11 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-04-11 17:45:42 +0000 |
| commit | 4560b61cd15aa026a03a64c99ead1edf7896826f (patch) | |
| tree | 318cd189f9af4300744a698062d46014396667a9 /tests/ui/closures/self-supertrait-bounds.rs | |
| parent | 25c342f30a3947323e0112af3ac5baa24a363396 (diff) | |
| download | rust-4560b61cd15aa026a03a64c99ead1edf7896826f.tar.gz rust-4560b61cd15aa026a03a64c99ead1edf7896826f.zip | |
Broken tests
Diffstat (limited to 'tests/ui/closures/self-supertrait-bounds.rs')
| -rw-r--r-- | tests/ui/closures/self-supertrait-bounds.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/closures/self-supertrait-bounds.rs b/tests/ui/closures/self-supertrait-bounds.rs new file mode 100644 index 00000000000..f4f1cea6b81 --- /dev/null +++ b/tests/ui/closures/self-supertrait-bounds.rs @@ -0,0 +1,14 @@ +// check-pass + +// Makes sure that we only consider `Self` supertrait predicates while +// elaborating during closure signature deduction. + +#![feature(trait_alias)] + +trait Confusing<F> = Fn(i32) where F: Fn(u32); + +fn alias<T: Confusing<F>, F>(_: T, _: F) {} + +fn main() { + alias(|_| {}, |_| {}); +} |
