Skip to content

Commit

Permalink
slightly better deprecation message for fn syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Gankra committed Nov 17, 2014
1 parent 0b7b4f0 commit 8c467f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libsyntax/parse/parser.rs
Expand Up @@ -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
Expand Down

0 comments on commit 8c467f7

Please sign in to comment.