[−][src]Trait rustc_trait_selection::traits::error_reporting::InferCtxtExt

pub trait InferCtxtExt<'tcx> {
    pub fn report_fulfillment_errors(
        &self,
        errors: &[FulfillmentError<'tcx>],
        body_id: Option<BodyId>,
        fallback_has_occurred: bool
    );
pub fn report_overflow_error<T>(
        &self,
        obligation: &Obligation<'tcx, T>,
        suggest_increasing_limit: bool
    ) -> !
    where
        T: Display + TypeFoldable<'tcx>
;
pub fn report_overflow_error_cycle(
        &self,
        cycle: &[PredicateObligation<'tcx>]
    ) -> !;
pub fn report_selection_error(
        &self,
        obligation: &PredicateObligation<'tcx>,
        error: &SelectionError<'tcx>,
        fallback_has_occurred: bool,
        points_at_arg: bool
    );
pub fn get_fn_like_arguments(
        &self,
        node: Node<'_>
    ) -> Option<(Span, Vec<ArgKind>)>;
pub fn report_arg_count_mismatch(
        &self,
        span: Span,
        found_span: Option<Span>,
        expected_args: Vec<ArgKind>,
        found_args: Vec<ArgKind>,
        is_closure: bool
    ) -> DiagnosticBuilder<'tcx>; }

Required methods

pub fn report_fulfillment_errors(
    &self,
    errors: &[FulfillmentError<'tcx>],
    body_id: Option<BodyId>,
    fallback_has_occurred: bool
)
[src]

pub fn report_overflow_error<T>(
    &self,
    obligation: &Obligation<'tcx, T>,
    suggest_increasing_limit: bool
) -> ! where
    T: Display + TypeFoldable<'tcx>, 
[src]

pub fn report_overflow_error_cycle(
    &self,
    cycle: &[PredicateObligation<'tcx>]
) -> !
[src]

pub fn report_selection_error(
    &self,
    obligation: &PredicateObligation<'tcx>,
    error: &SelectionError<'tcx>,
    fallback_has_occurred: bool,
    points_at_arg: bool
)
[src]

pub fn get_fn_like_arguments(
    &self,
    node: Node<'_>
) -> Option<(Span, Vec<ArgKind>)>
[src]

Given some node representing a fn-like thing in the HIR map, returns a span and ArgKind information that describes the arguments it expects. This can be supplied to report_arg_count_mismatch.

pub fn report_arg_count_mismatch(
    &self,
    span: Span,
    found_span: Option<Span>,
    expected_args: Vec<ArgKind>,
    found_args: Vec<ArgKind>,
    is_closure: bool
) -> DiagnosticBuilder<'tcx>
[src]

Reports an error when the number of arguments needed by a trait match doesn't match the number that the expression provides.

Loading content...

Implementors

impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx>[src]

pub fn report_overflow_error<T>(
    &self,
    obligation: &Obligation<'tcx, T>,
    suggest_increasing_limit: bool
) -> ! where
    T: Display + TypeFoldable<'tcx>, 
[src]

Reports that an overflow has occurred and halts compilation. We halt compilation unconditionally because it is important that overflows never be masked -- they basically represent computations whose result could not be truly determined and thus we can't say if the program type checks or not -- and they are unusual occurrences in any case.

pub fn report_overflow_error_cycle(
    &self,
    cycle: &[PredicateObligation<'tcx>]
) -> !
[src]

Reports that a cycle was detected which led to overflow and halts compilation. This is equivalent to report_overflow_error except that we can give a more helpful error message (and, in particular, we do not suggest increasing the overflow limit, which is not going to help).

pub fn get_fn_like_arguments(
    &self,
    node: Node<'_>
) -> Option<(Span, Vec<ArgKind>)>
[src]

Given some node representing a fn-like thing in the HIR map, returns a span and ArgKind information that describes the arguments it expects. This can be supplied to report_arg_count_mismatch.

pub fn report_arg_count_mismatch(
    &self,
    span: Span,
    found_span: Option<Span>,
    expected_args: Vec<ArgKind>,
    found_args: Vec<ArgKind>,
    is_closure: bool
) -> DiagnosticBuilder<'tcx>
[src]

Reports an error when the number of arguments needed by a trait match doesn't match the number that the expression provides.

Loading content...