diff options
Diffstat (limited to 'tests/ui/generic-associated-types/parse/trait-path-segments.rs')
-rw-r--r-- | tests/ui/generic-associated-types/parse/trait-path-segments.rs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/ui/generic-associated-types/parse/trait-path-segments.rs b/tests/ui/generic-associated-types/parse/trait-path-segments.rs new file mode 100644 index 000000000..458e203eb --- /dev/null +++ b/tests/ui/generic-associated-types/parse/trait-path-segments.rs @@ -0,0 +1,32 @@ +const _: () = { + trait X { + type Y<'a>; + } + + fn f1<'a>(arg : Box<dyn X<X::Y = u32>>) {} + //~^ ERROR: expected one of + }; + +const _: () = { + trait X { + type Y<'a>; + } + + trait Z {} + + impl<T : X<<Self as X>::Y<'a> = &'a u32>> Z for T {} + //~^ ERROR: expected one of +}; + +const _: () = { + trait X { + type Y<'a>; + } + + trait Z {} + + impl<T : X<X::Y<'a> = &'a u32>> Z for T {} + //~^ ERROR: expected one of +}; + +fn main() {} |