about summary refs log tree commit diff
path: root/src/test/parse-fail
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2017-01-19 13:28:45 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2017-01-19 13:28:45 +0300
commit853f6974767243e2e5defb43f5f7195ce1fb1cc7 (patch)
treede69b2f21ea89aace638a4bd09e6e3eb79621406 /src/test/parse-fail
parent74c42ac173bee900979870ed986c760596d1fbdb (diff)
downloadrust-853f6974767243e2e5defb43f5f7195ce1fb1cc7.tar.gz
rust-853f6974767243e2e5defb43f5f7195ce1fb1cc7.zip
Fix regression in parsing of trait object types
Diffstat (limited to 'src/test/parse-fail')
-rw-r--r--src/test/parse-fail/bounds-obj-parens.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/parse-fail/bounds-obj-parens.rs b/src/test/parse-fail/bounds-obj-parens.rs
new file mode 100644
index 00000000000..cbdffb4a255
--- /dev/null
+++ b/src/test/parse-fail/bounds-obj-parens.rs
@@ -0,0 +1,15 @@
+// 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
+
+type A = Box<(Fn(D::Error) -> E) + 'static + Send + Sync>; // OK
+
+FAIL //~ ERROR