diff options
Diffstat (limited to 'tests/ui/generic-associated-types/parse/trait-path-expressions.rs')
-rw-r--r-- | tests/ui/generic-associated-types/parse/trait-path-expressions.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/ui/generic-associated-types/parse/trait-path-expressions.rs b/tests/ui/generic-associated-types/parse/trait-path-expressions.rs new file mode 100644 index 000000000..9183ec497 --- /dev/null +++ b/tests/ui/generic-associated-types/parse/trait-path-expressions.rs @@ -0,0 +1,20 @@ +mod error1 { + trait X { + type Y<'a>; + } + + fn f1<'a>(arg : Box<dyn X< 1 = 32 >>) {} + //~^ ERROR: expected expression, found `)` +} + +mod error2 { + + trait X { + type Y<'a>; + } + + fn f2<'a>(arg : Box<dyn X< { 1 } = 32 >>) {} + //~^ ERROR: expected one of +} + +fn main() {} |