{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreibcgfvrj2zerzeeawysrds6bfainv4ceath2mn2ewnslnvxwglqoq",
    "uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3migqaxhlbfx2"
  },
  "path": "/t/change-error-message-of-a-failing-assert-eq/24118#post_19",
  "publishedAt": "2026-04-01T11:39:47.000Z",
  "site": "https://internals.rust-lang.org",
  "textContent": "Perhaps it is down to coding style, but `actual` is usually a variable whereas `expected` is either hand-typed or also pulling a local variable (e.g., to make sure a configuration value gets through). Could be that the borrow checker tends to nudge towards having a local variable for computed results? It also avoids \"cross-over\" when doing `let cases = [(input, answer), …];` into a `for (a, e) in cases { assert_eq!(i.some_method(), e); }` loop.",
  "title": "Change error message of a failing `assert_eq!`"
}