about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs6
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);
                 }
             }