]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: fix bad not expression in rust
authorPhilip Herron <herron.philip@googlemail.com>
Thu, 12 Dec 2024 14:56:14 +0000 (14:56 +0000)
committerArthur Cohen <arthur.cohen@embecosm.com>
Fri, 21 Mar 2025 11:55:43 +0000 (12:55 +0100)
Fixes Rust-GCC#3229

gcc/rust/ChangeLog:

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

Signed-off-by: Philip Herron <herron.philip@googlemail.com>
gcc/rust/rust-gcc.cc

index 7da5e2c563772a3c6d084c08c7bfc6622179f04b..37d51e58c08e15ae52905d5d4d6a1997d31a0fd1 100644 (file)
@@ -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 ();
     }