diff options
Diffstat (limited to 'tests/ui/associated-types/issue-44153.rs')
-rw-r--r-- | tests/ui/associated-types/issue-44153.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/ui/associated-types/issue-44153.rs b/tests/ui/associated-types/issue-44153.rs new file mode 100644 index 000000000..2101cb61a --- /dev/null +++ b/tests/ui/associated-types/issue-44153.rs @@ -0,0 +1,19 @@ +pub trait Array { + type Element; +} + +pub trait Visit { + fn visit() {} +} + +impl Array for () { + type Element = (); +} + +impl<'a> Visit for () where + (): Array<Element=&'a ()>, +{} + +fn main() { + <() as Visit>::visit(); //~ ERROR: type mismatch resolving +} |