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.
1 parent 5ce9b80 commit 4fc0532Copy full SHA for 4fc0532
src/librustc_parse/parser/expr.rs
@@ -645,7 +645,9 @@ impl<'a> Parser<'a> {
645
646
// Check if an illegal postfix operator has been added after the cast.
647
// If the resulting expression is not a cast, or has a different memory location, it is an illegal postfix operator.
648
- if !matches!(with_postfix.kind, ExprKind::Cast(_, _)) || after_hash != before_hash {
+ if !matches!(with_postfix.kind, ExprKind::Cast(_, _) | ExprKind::Type(_, _))
649
+ || after_hash != before_hash
650
+ {
651
let expr_str = self.span_to_snippet(span);
652
653
let msg = format!(
0 commit comments