slightly better deprecation message for fn syntax

This commit is contained in:
Alexis Beingessner 2014-11-16 23:01:37 -05:00
parent 0b7b4f075a
commit 8c467f75e3

View File

@ -1229,7 +1229,8 @@ impl<'a> Parser<'a> {
{
if self.eat(&token::Lt) {
if lifetime_defs.is_empty() {
self.warn("deprecated syntax, use `for` keyword now");
self.warn("deprecated syntax; use the `for` keyword now \
(e.g. change `fn<'a>` to `for<'a> fn`)");
let lifetime_defs = self.parse_lifetime_defs();
self.expect_gt();
lifetime_defs