Skip to content

Commit

Permalink
gccrs: fix bad not expression in rust
Browse files Browse the repository at this point in the history
Fixes #3229

gcc/rust/ChangeLog:

	* rust-gcc.cc (operator_to_tree_code): ! expressions are BIT_NOT_EXPR

Signed-off-by: Philip Herron <[email protected]>
  • Loading branch information
philberty committed Dec 13, 2024
1 parent 55a9d8d commit cc2445c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gcc/rust/rust-gcc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@ operator_to_tree_code (NegationOperator op)
case NegationOperator::NEGATE:
return NEGATE_EXPR;
case NegationOperator::NOT:
return TRUTH_NOT_EXPR;
return BIT_NOT_EXPR;
default:
rust_unreachable ();
}
Expand Down

0 comments on commit cc2445c

Please sign in to comment.