summaryrefslogtreecommitdiffstats
path: root/src/test/ui/parser/associated-types-project-from-hrtb-explicit.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/parser/associated-types-project-from-hrtb-explicit.rs')
-rw-r--r--src/test/ui/parser/associated-types-project-from-hrtb-explicit.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/parser/associated-types-project-from-hrtb-explicit.rs b/src/test/ui/parser/associated-types-project-from-hrtb-explicit.rs
new file mode 100644
index 000000000..b238a9ca2
--- /dev/null
+++ b/src/test/ui/parser/associated-types-project-from-hrtb-explicit.rs
@@ -0,0 +1,16 @@
+// Test you can't use a higher-ranked trait bound inside of a qualified
+// path (just won't parse).
+
+pub trait Foo<T> {
+ type A;
+
+ fn get(&self, t: T) -> Self::A;
+}
+
+fn foo2<I>(x: <I as for<'x> Foo<&'x isize>>::A)
+ //~^ ERROR expected identifier, found keyword `for`
+ //~| ERROR expected one of `::` or `>`
+{
+}
+
+pub fn main() {}