{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreico7qzjc5rdjl2gkrsjnftmv3spc4pf5cdmrbbehgjdie46m4t7fq",
    "uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3miimnfdanzr2"
  },
  "path": "/t/q-why-do-match-expression-need-parenthesis-for-ops-to-the-right-but-not-left/24126#post_1",
  "publishedAt": "2026-04-02T04:07:20.000Z",
  "site": "https://internals.rust-lang.org",
  "textContent": "Quick question for my understanding, why is:\n\n\n        num_apples * match num_apples.cmp(&40) {\n            Ordering::Greater => 1u8 ,\n            _ => 2u8,\n        }\n\n\nok, but this is not ok:\n\n\n         match num_apples.cmp(&40) {\n            Ordering::Greater => 1u8 ,\n            _ => 2u8,\n        } * num_apples\n\n\nthe lack of `;` means this should be an expression and the type of the first expression is known at compile so Mul should work, but it doesn't.",
  "title": "Q: Why do match expression need parenthesis for ops to the right but not left?"
}