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_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.