diff options
| author | bors <bors@rust-lang.org> | 2014-06-21 15:36:39 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-06-21 15:36:39 +0000 |
| commit | f556c8cbd8af182a9dd871a4a36692a0dba7cc2e (patch) | |
| tree | ff327e3fd249e8d4b9fa9f0985e78f34592a3310 /src/libsyntax/parse/parser.rs | |
| parent | 0ae4b97c09a5b5c230f5dee9bdcef85951b6e00d (diff) | |
| parent | ae067477fbc08e5998756d36b6ab0b82173e5c74 (diff) | |
| download | rust-f556c8cbd8af182a9dd871a4a36692a0dba7cc2e.tar.gz rust-f556c8cbd8af182a9dd871a4a36692a0dba7cc2e.zip | |
auto merge of #15062 : pcwalton/rust/trailing-plus, r=brson
This will break code that looks like `Box<Trait+>`. Change that code to `Box<Trait>` instead. Closes #14925. [breaking-change] r? @brson
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index b56919c53c7..043ce3bf5b0 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1658,6 +1658,12 @@ impl<'a> Parser<'a> { let bounds = { if self.eat(&token::BINOP(token::PLUS)) { let (_, bounds) = self.parse_ty_param_bounds(false); + if bounds.len() == 0 { + let last_span = self.last_span; + self.span_err(last_span, + "at least one type parameter bound \ + must be specified after the `+`"); + } Some(bounds) } else { None |
