Skip to main content

query_trait_ensures

Function query_trait_ensures 

Source
pub(crate) fn query_trait_ensures(
    tcx: TyCtxt<'_>,
    trait_def_id: DefId,
) -> Vec<JsonProperty>
Expand description

Returns the ensures obligation template for a marker trait such as Send/Sync, keyed by the trait’s def path (e.g. "core::marker::Send").

The returned entries are templates: ty:Self placeholders are resolved to the concrete implementing type by the caller (TraitEnsurance collection).

Matching falls back to the trait’s short name so that std/core re-exports (std::marker::Send vs core::marker::Send) resolve to the same entry.