Module structural_traits

Source
Expand description

Code which is used by built-in goals that match “structurally”, such a auto traits, Copy/Clone.

Structs§

AsyncCallableRelevantTypes 🔒
Relevant types for an async callable, including its inputs, output, and the return type you get from awaiting the output.
ReplaceProjectionWith 🔒

Functions§

const_conditions_for_destruct 🔒
coroutine_closure_to_ambiguous_coroutine 🔒
Given a coroutine-closure, project to its returned coroutine when we are not certain that the closure’s kind is compatible with the goal, and therefore also don’t know yet what the closure’s upvars are.
coroutine_closure_to_certain_coroutine 🔒
Given a coroutine-closure, project to its returned coroutine when we are certain that the closure’s kind is compatible with the goal.
extract_fn_def_from_const_callable 🔒
This duplicates extract_tupled_inputs_and_output_from_callable but needs to return different information (namely, the def id and args) so that we can create const conditions.
extract_tupled_inputs_and_output_from_async_callable 🔒
extract_tupled_inputs_and_output_from_callable 🔒
fn_item_to_async_callable 🔒
instantiate_constituent_tys_for_auto_trait 🔒
instantiate_constituent_tys_for_copy_clone_trait 🔒
instantiate_constituent_tys_for_sized_trait 🔒
predicates_for_object_candidate 🔒
Assemble a list of predicates that would be present on a theoretical user impl for an object type. These predicates must be checked any time we assemble a built-in object candidate for an object type, since they are not implied by the well-formedness of the type.