about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-11-14 02:46:12 -0800
committerGitHub <noreply@github.com>2016-11-14 02:46:12 -0800
commit8289a8916f9cf7d290a98121a75cee840faa9d0f (patch)
tree7ed4b2e31762811bbc310b9b003bb11026b33faf /src/test
parent7bef60a64894b0606ad9f5dc76256d5321b270a6 (diff)
parentcf9ff2b59bf876650b1e13ab66078bfd22ac85ef (diff)
downloadrust-8289a8916f9cf7d290a98121a75cee840faa9d0f.tar.gz
rust-8289a8916f9cf7d290a98121a75cee840faa9d0f.zip
Auto merge of #37278 - matklad:lone-lifetime, r=jseyfried
Fix syntax error in the compiler

Currently `rustc` accepts the following code: `fn f<'a>() where 'a {}`. This should be a syntax error, shouldn't it?

Not sure if my changes actually compile, waiting for the LLVM to build.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/parse-fail/where-clauses-no-bounds-or-predicates.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/test/parse-fail/where-clauses-no-bounds-or-predicates.rs b/src/test/parse-fail/where-clauses-no-bounds-or-predicates.rs
index 45165b76c4a..78d97454087 100644
--- a/src/test/parse-fail/where-clauses-no-bounds-or-predicates.rs
+++ b/src/test/parse-fail/where-clauses-no-bounds-or-predicates.rs
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -20,5 +20,8 @@ fn equal2<T>(_: &T, _: &T) -> bool where T: {
     true
 }
 
+fn foo<'a>() where 'a {}
+//~^ ERROR expected `:`, found `{`
+
 fn main() {
 }