]> 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)
committerPhilip Herron <philip.herron@embecosm.com>
Fri, 13 Dec 2024 11:57:33 +0000 (11:57 +0000)
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 0590479202bdf7620841d5c5f748edceba72900d..3f8986e5519c0bf05f5e23aefe93eb3ab55528c7 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 ();
     }