check_externally_implementable_items

Function check_externally_implementable_items 

Source
pub(crate) fn check_externally_implementable_items<'tcx>(
    tcx: TyCtxt<'tcx>,
    (): (),
)
Expand description

Checks for a given crate, what EIIs need to be generated in it. This is usually a small subset of all EIIs.

EII implementations come in two varieties: explicit and default. This query is called once for every crate, to check whether there aren’t any duplicate explicit implementations. A duplicate may be caused by an implementation in the current crate, though it’s also entirely possible that the source is two dependencies with an explicit implementation. Those work fine on their own but the combination of the two is a conflict.

However, if the current crate is a “root” crate, one that generates a final artifact like a binary, then we check one more thing, namely that every EII actually has an implementation, either default or not. If one EII has no implementation, that’s an error at that point.

These two behaviors are implemented using CheckingMode.