Skip to content

Commit 20241aa

Browse files
author
Jakub Bukaj
committed
rollup merge of #19020: Gankro/better-warn
Came up on IRC that this was a bit unhelpful as to what should actually be *done*. I am new to changing compiler messages, please let me know if there's anything else that needs to be done to accomadate this change. (My build system is still constantly crashing [Is bors contagious?], so this hasn't been formally `check`ed. I figure it's a simple enough change that any consequences [like compile-fail expected messages?] can be eyeballed by someone more experienced.)
2 parents f712a6f + 8c467f7 commit 20241aa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libsyntax/parse/parser.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1232,7 +1232,8 @@ impl<'a> Parser<'a> {
12321232
{
12331233
if self.eat(&token::Lt) {
12341234
if lifetime_defs.is_empty() {
1235-
self.warn("deprecated syntax, use `for` keyword now");
1235+
self.warn("deprecated syntax; use the `for` keyword now \
1236+
(e.g. change `fn<'a>` to `for<'a> fn`)");
12361237
let lifetime_defs = self.parse_lifetime_defs();
12371238
self.expect_gt();
12381239
lifetime_defs

0 commit comments

Comments
 (0)