get_std_contracts_from_assets

Function get_std_contracts_from_assets 

Source
pub fn get_std_contracts_from_assets(
    tcx: TyCtxt<'_>,
    def_id: DefId,
) -> &'static [PropertyEntry]
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, 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:

  1. core::slice::<impl [T]>::as_chunks (exact)
  2. core::slice::<impl [T]>::* (all methods of [T])
  3. core::slice::* (all functions in slice module)
  4. core::* (anything in core crate)