diff options
| author | bors <bors@rust-lang.org> | 2016-11-13 09:53:30 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-11-13 09:53:30 -0800 |
| commit | 876b7610100a6609db04be010144062f582cfb8c (patch) | |
| tree | 79e5d8147b4dc1d710e063e511cee1fcbac0c21f /src/libsyntax | |
| parent | ea02f87daab14fff71af751c8e3f66b689cac3cd (diff) | |
| parent | 34f33ec789297716995045f7067aeb4d77947d89 (diff) | |
| download | rust-876b7610100a6609db04be010144062f582cfb8c.tar.gz rust-876b7610100a6609db04be010144062f582cfb8c.zip | |
Auto merge of #37753 - est31:master, r=petrochenkov
Fix empty lifetime list or one with trailing comma being rejected Fixes #37733
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 7d15334ff9f..c3f8a79c1cc 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1902,12 +1902,12 @@ impl<'a> Parser<'a> { if let Some(recv) = followed_by_ty_params { assert!(recv.is_empty()); *recv = attrs; - } else { + debug!("parse_lifetime_defs ret {:?}", res); + return Ok(res); + } else if !attrs.is_empty() { let msg = "trailing attribute after lifetime parameters"; return Err(self.fatal(msg)); } - debug!("parse_lifetime_defs ret {:?}", res); - return Ok(res); } } |
