We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
let a = (let b = something)
1 parent 6866f13 commit 082c03bCopy full SHA for 082c03b
src/libsyntax/parse/parser.rs
@@ -2199,6 +2199,12 @@ impl<'a> Parser<'a> {
2199
UnsafeBlock(ast::UserProvided),
2200
attrs);
2201
}
2202
+ if self.eat_keyword(keywords::Let) {
2203
+ return Err(self.span_fatal(self.span,
2204
+ "`let` is not an expression, so it cannot \
2205
+ be used in this way"))
2206
+
2207
+ }
2208
if self.eat_keyword(keywords::Return) {
2209
if self.token.can_begin_expr() {
2210
let e = try!(self.parse_expr());
0 commit comments