Skip to main content

Module always_applicable

Module always_applicable 

Source
Expand description

This module contains methods that assist in checking that impls are general enough, i.e. that they always apply to every valid instantaiton of the ADT theyโ€™re implemented for.

This is necessary for Drop and negative impls to be well-formed.

Functionsยง

check_drop_impl ๐Ÿ”’
This function confirms that the Drop implementation identified by drop_impl_did is not any more specialized than the type it is attached to (Issue #8142).
check_negative_auto_trait_impl ๐Ÿ”’
ensure_all_fields_are_const_destruct ๐Ÿ”’
ensure_impl_params_and_item_params_correspond ๐Ÿ”’
ensure_impl_predicates_are_implied_by_item_defn ๐Ÿ”’
Confirms that all predicates defined on the Drop impl (drop_impl_def_id) are able to be proven from within adt_def_idโ€™s environment. I.e. all the predicates on the impl are implied by the ADT being well formed.