about summary refs log tree commit diff
path: root/src/test/parse-fail
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2018-01-14 18:10:19 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2018-01-14 18:10:19 +0300
commit60c48dd16ae579e6f2e0ae74862b0420ff471da9 (patch)
treeeb068aeaec05dc394ca14ec455096b00624f9294 /src/test/parse-fail
parentd19e4c4a8507da7e35d0de2b196c48e6621de1f9 (diff)
syntax: Disambiguate generics and qualified paths
Diffstat (limited to 'src/test/parse-fail')
-rw-r--r--src/test/parse-fail/impl-qpath.rs18
-rw-r--r--src/test/parse-fail/where_with_bound.rs2
2 files changed, 19 insertions, 1 deletions
diff --git a/src/test/parse-fail/impl-qpath.rs b/src/test/parse-fail/impl-qpath.rs
new file mode 100644
index 00000000000..48dd888b2e5
--- /dev/null
+++ b/src/test/parse-fail/impl-qpath.rs
@@ -0,0 +1,18 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Z parse-only
+
+impl <*const u8>::AssocTy {} // OK
+impl <Type as Trait>::AssocTy {} // OK
+impl <'a + Trait>::AssocTy {} // OK
+impl <<Type>::AssocTy>::AssocTy {} // OK
+
+FAIL //~ ERROR
diff --git a/src/test/parse-fail/where_with_bound.rs b/src/test/parse-fail/where_with_bound.rs
index cb57500df79..2948619ccd0 100644
--- a/src/test/parse-fail/where_with_bound.rs
+++ b/src/test/parse-fail/where_with_bound.rs
@@ -11,6 +11,6 @@
 // compile-flags: -Z parse-only
 
 fn foo<T>() where <T>::Item: ToString, T: Iterator { }
-               //~^ syntax `where<T>` is reserved for future use
+//~^ ERROR generic parameters on `where` clauses are reserved for future use
 
 fn main() {}