pub(crate) fn get_std_contracts_from_json(
tcx: TyCtxt<'_>,
def_id: DefId,
) -> Option<&'static [JsonProperty]>Expand description
Looks up backup contracts for a standard-library function by its normalized path. For trait-method impls, resolves to the trait method’s path first so that all impls share the same contracts.
After exact-path lookup, first strips impl-block type segments, then falls
back to wildcard patterns by progressively replacing the tail segment with
*. For example, for core::slice::<impl [T]>::as_chunks, the fallback
chain is:
core::slice::<impl [T]>::as_chunks(exact)core::slice::as_chunks(impl segments stripped)core::slice::<impl [T]>::*(all methods of[T])core::slice::*(all functions in slice module)core::*(anything in core crate)