slightly better deprecation message for fn syntax
This commit is contained in:
parent
0b7b4f075a
commit
8c467f75e3
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue