slightly better deprecation message for fn syntax
This commit is contained in:
parent
0b7b4f075a
commit
8c467f75e3
@ -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…
x
Reference in New Issue
Block a user