diff options
| author | Alexander Regueiro <alexreg@me.com> | 2019-06-18 00:38:29 +0100 |
|---|---|---|
| committer | Alexander Regueiro <alexreg@me.com> | 2019-08-05 15:16:28 +0100 |
| commit | 4e0e645dd964920e2a7ea5831ab90dd75c2676ff (patch) | |
| tree | 261ce7ac050f7ab99e70d5ebd1505a81513755b0 /src | |
| parent | e0712c898e8e180a1a3e1d3497a33078197a64d4 (diff) | |
| download | rust-4e0e645dd964920e2a7ea5831ab90dd75c2676ff.tar.gz rust-4e0e645dd964920e2a7ea5831ab90dd75c2676ff.zip | |
Added test for issue.
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/ui/associated-type-bounds/issue-61752.rs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/test/ui/associated-type-bounds/issue-61752.rs b/src/test/ui/associated-type-bounds/issue-61752.rs new file mode 100644 index 00000000000..27c302b793a --- /dev/null +++ b/src/test/ui/associated-type-bounds/issue-61752.rs @@ -0,0 +1,24 @@ +// run-pass + +#![feature(associated_type_bounds)] + +trait Foo { + type Bar; +} + +impl Foo for () { + type Bar = (); +} + +fn a<F: Foo>() where F::Bar: Copy {} + +fn b<F: Foo>() where <F as Foo>::Bar: Copy {} + +// This used to complain about ambiguous associated types. +fn c<F: Foo<Bar: Foo>>() where F::Bar: Copy {} + +fn main() { + a::<()>(); + b::<()>(); + c::<()>(); +} |
