# Trait rustc_infer::infer::ObligationEmittingRelation

source ·

    pub trait ObligationEmittingRelation<'tcx>: TypeRelation<'tcx> {
        // Required methods
        fn span(&self) -> Span;
        fn param_env(&self) -> ParamEnv<'tcx>;
        fn structurally_relate_aliases(&self) -> StructurallyRelateAliases;
        fn register_obligations(&mut self, obligations: PredicateObligations<'tcx>);
        fn register_predicates(
            &mut self,
            obligations: impl IntoIterator<Item: ToPredicate<'tcx>>
        );
        fn register_type_relate_obligation(&mut self, a: Ty<'tcx>, b: Ty<'tcx>);
    }

## Required Methods§

source

#### fn span(&self) -> Span

source

#### fn param_env(&self) -> ParamEnv<'tcx>

source

#### fn structurally_relate_aliases(&self) -> StructurallyRelateAliases

Whether aliases should be related structurally. This is pretty much always `No` unless you’re equating in some specific locations of the new solver. See the comments in these use-cases for more details.

source

#### fn register_obligations(&mut self, obligations: PredicateObligations<'tcx>)

Register obligations that must hold in order for this relation to hold

source

#### fn register_predicates( &mut self, obligations: impl IntoIterator<Item: ToPredicate<'tcx>> )

Register predicates that must hold in order for this relation to hold. Uses a default obligation cause, `ObligationEmittingRelation::register_obligations` should be used if control over the obligation causes is required.

source

#### fn register_type_relate_obligation(&mut self, a: Ty<'tcx>, b: Ty<'tcx>)

Register `AliasRelate` obligation(s) that both types must be related to each other.

## Object Safety§

This trait is not object safe.

## Implementors§

source§

### impl<'tcx> ObligationEmittingRelation<'tcx> for Glb<'_, '_, 'tcx>

source§

### impl<'tcx> ObligationEmittingRelation<'tcx> for Lub<'_, '_, 'tcx>

source§

### impl<'tcx> ObligationEmittingRelation<'tcx> for TypeRelating<'_, '_, 'tcx>