File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
29
29
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
30
30
refs/tags/homu-tmp: c0221c8897db309a79990367476177b1230bb264
31
31
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32
- refs/heads/stable: 79f2cff44ec62cf42f6c97d28dc4286de683b1e5
32
+ refs/heads/stable: 2b1e2732930830fc295d26bfb4bb29931e7e84ac
33
33
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
34
34
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
35
35
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e
Original file line number Diff line number Diff line change @@ -2134,12 +2134,6 @@ impl<'a> Parser<'a> {
2134
2134
}
2135
2135
hi = self . last_span . hi ;
2136
2136
}
2137
- _ if self . token . is_keyword ( keywords:: Let ) => {
2138
- // Catch this syntax error here, instead of in `check_strict_keywords`, so that
2139
- // we can explicitly mention that let is not to be used as an expression
2140
- let msg = "`let` is not an expression, so it cannot be used in this way" ;
2141
- return Err ( self . diagnostic ( ) . struct_span_err ( self . span , & msg) ) ;
2142
- } ,
2143
2137
_ => {
2144
2138
if self . eat_lt ( ) {
2145
2139
let ( qself, path) =
@@ -2162,6 +2156,12 @@ impl<'a> Parser<'a> {
2162
2156
let lo = self . last_span . lo ;
2163
2157
return self . parse_while_expr ( None , lo, attrs) ;
2164
2158
}
2159
+ if self . token . is_keyword ( keywords:: Let ) {
2160
+ // Catch this syntax error here, instead of in `check_strict_keywords`, so
2161
+ // that we can explicitly mention that let is not to be used as an expression
2162
+ let msg = "`let` is not an expression, so it cannot be used in this way" ;
2163
+ self . span_err ( self . span , msg) ;
2164
+ }
2165
2165
if self . token . is_lifetime ( ) {
2166
2166
let lifetime = self . get_lifetime ( ) ;
2167
2167
let lo = self . span . lo ;
Original file line number Diff line number Diff line change 10
10
11
11
// ignore-cross-compile
12
12
13
- // error-pattern:expected identifier, found keyword `let`
13
+ // error-pattern:`let` is not an expression, so it cannot be used in this way
14
14
15
15
#![ feature( quote, rustc_private) ]
16
16
You can’t perform that action at this time.
0 commit comments