{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreiab4etagf43ohfxut3dhpfq2rxviel6ryifnj5zxnz3vmvke2xbwm",
    "uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mmu77tefgpn2"
  },
  "path": "/t/pre-rfc-unsafe-traits-conditionally-depending-on-safe-trait-behaviour/24360#post_6",
  "publishedAt": "2026-05-27T16:52:27.000Z",
  "site": "https://internals.rust-lang.org",
  "textContent": "We spoke about this in the libs meeting today and concluded that we're going to do marker traits for now, and try to migrate to this backwards-compatibly if feasible. Effectively:\n\n\n    #[unsafe(has_preconditions(A))]\n    trait B {}\n\n    #[unsafe(satisfies_preconditions(A))]\n    impl<T: Whatever> B for T {}\n\n\ncan expand to:\n\n\n    unsafe trait Unsafe_A_and_B: A + B {}\n    trait B {}\n\n    unsafe impl<T: Whatever + A + B> Unsafe_A_and_B for T {}\n    impl<T: Whatever> B for T {}\n\n\nwith unsafe code just relying on `Unsafe_A_and_B` being implemented as part of its safety contract.",
  "title": "Pre-RFC: Unsafe traits conditionally depending on safe trait behaviour"
}