{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreib3ec77uikzeqnwcs5oglutw2pq4bl42g4bfunzmw3csacbwdmcum",
    "uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mgzupqctxky2"
  },
  "path": "/t/could-borrow-checking-with-origins-unblock-sound-specialization/24079#post_6",
  "publishedAt": "2026-03-14T15:45:12.000Z",
  "site": "https://internals.rust-lang.org",
  "textContent": "No, `'static` bounds are _also_ computed by the borrow checker, just like other `T: 'a` lifetime bounds. I could modify my above example to make `n_ref` a `'static` reference, meaning that better control flow analysis in the borrow checker could result in `another_ref` later being recognized as a `'static` reference when it’s used in `result`.\n\nSpecializing on some compiler-implemented `HasNoLifetimeParameters` trait could be reasonable, though. I believe that\n\n\n    struct Foo(&'static str);\n\n\ncould implement `HasNoLifetimeParameters`, while `&'static str` would not, in order to avoid relying on context to determine whether a given string is “really genuinely guaranteed to always be `'static`”, “always `'static` in the current `rustc` version, but not explicitly annotated as `'static` so this might surprise the user”, or “only sometimes `'static`”.",
  "title": "Could borrow checking with origins unblock sound specialization"
}