{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreib2qjytwv6jwektt3rp2g66foncp3fi6pzf5adoxsd7oijqysy34u",
"uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mmtx7hzbylv2"
},
"path": "/t/pre-rfc-unsafe-traits-conditionally-depending-on-safe-trait-behaviour/24360#post_3",
"publishedAt": "2026-05-27T16:33:31.000Z",
"site": "https://internals.rust-lang.org",
"textContent": "My problem with this is that `#[unsafe(has_preconditions(Allocator))]` introduces an obligation, but is too close of a syntax to `#[unsafe(satisfies_preconditions(Allocator))]` which discharges an obligation (opposite polarity).\n\n`unsafe fn` and `unsafe { .. }` is the more frequent confusion, but at least one has braces and the other doesn't, and one is applied to an item and the other is an expression.. so it feels different in a way that `#[unsafe(..something)]` doesn't.\n\nBut I guess this ship sailed. (`unsafe trait` / `unsafe impl` is just as confusable)",
"title": "Pre-RFC: Unsafe traits conditionally depending on safe trait behaviour"
}