summaryrefslogtreecommitdiffstats
path: root/src/test/ui/generic-associated-types/parse/trait-path-segments.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/generic-associated-types/parse/trait-path-segments.rs')
-rw-r--r--src/test/ui/generic-associated-types/parse/trait-path-segments.rs34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/test/ui/generic-associated-types/parse/trait-path-segments.rs b/src/test/ui/generic-associated-types/parse/trait-path-segments.rs
new file mode 100644
index 000000000..e943f075f
--- /dev/null
+++ b/src/test/ui/generic-associated-types/parse/trait-path-segments.rs
@@ -0,0 +1,34 @@
+#![feature(generic_associated_types)]
+
+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() {}