Skip to content

Remove an address comparison from the parser #104147

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix outdated comment
Co-authored-by: clubby789 <jamie@hill-daniel.co.uk>
  • Loading branch information
WaffleLapkin and clubby789 authored Nov 8, 2022
commit 268ea3528d85c44126aa01a22b9c00f0951f21f0
2 changes: 1 addition & 1 deletion compiler/rustc_parse/src/parser/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ impl<'a> Parser<'a> {
let with_postfix = self.parse_dot_or_call_expr_with_(cast_expr, span)?;

// Check if an illegal postfix operator has been added after the cast.
// If the resulting expression is not a cast, or has a different memory location, it is an illegal postfix operator.
// If the resulting expression is not a cast, it is an illegal postfix operator.
if !matches!(with_postfix.kind, ExprKind::Cast(_, _) | ExprKind::Type(_, _)) {
let msg = format!(
"{cast_kind} cannot be followed by {}",
Expand Down