Skip to content

Commit 4a5508f

Browse files
committed
---
yaml --- r: 274273 b: refs/heads/stable c: 065e47e h: refs/heads/master i: 274271: dbce758
1 parent 1f9c976 commit 4a5508f

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: c0221c8897db309a79990367476177b1230bb264
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: d829019ff4874e2a4f1b6780c442dfa524e75d38
32+
refs/heads/stable: 065e47eb3b23a9bd3074d3406157f0aafc575150
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/src/libsyntax/parse/parser.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2221,8 +2221,9 @@ impl<'a> Parser<'a> {
22212221
} else if self.token.is_keyword(keywords::Let) {
22222222
// Catch this syntax error here, instead of in `check_strict_keywords`, so
22232223
// that we can explicitly mention that let is not to be used as an expression
2224-
let msg = "`let` is not an expression, so it cannot be used in this way";
2225-
return Err(self.fatal(&msg));
2224+
let mut db = self.fatal("expected expression, found statement (`let`)");
2225+
db.note("variable declaration using `let` is a statement");
2226+
return Err(db);
22262227
} else if self.check(&token::ModSep) ||
22272228
self.token.is_ident() &&
22282229
!self.check_keyword(keywords::True) &&

branches/stable/src/test/run-fail-fulldeps/qquote.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// ignore-cross-compile
1212

13-
// error-pattern:`let` is not an expression, so it cannot be used in this way
13+
// error-pattern:expected expression, found statement (`let`)
1414

1515
#![feature(quote, rustc_private)]
1616

0 commit comments

Comments
 (0)