Trait rustc_typeck::traits::error_reporting::InferCtxtExt [−][src]
pub trait InferCtxtExt<'tcx> {
fn report_fulfillment_errors(
&self,
errors: &[FulfillmentError<'tcx>],
body_id: Option<BodyId>,
fallback_has_occurred: bool
);
fn report_overflow_error<T>(
&self,
obligation: &Obligation<'tcx, T>,
suggest_increasing_limit: bool
) -> !
where
T: Display + TypeFoldable<'tcx>;
fn report_overflow_error_cycle(
&self,
cycle: &[Obligation<'tcx, Predicate<'tcx>>]
) -> !;
fn report_selection_error(
&self,
obligation: Obligation<'tcx, Predicate<'tcx>>,
root_obligation: &Obligation<'tcx, Predicate<'tcx>>,
error: &SelectionError<'tcx>,
fallback_has_occurred: bool
);
fn get_fn_like_arguments(
&self,
node: Node<'_>
) -> Option<(Span, Vec<ArgKind, Global>)>;
fn report_arg_count_mismatch(
&self,
span: Span,
found_span: Option<Span>,
expected_args: Vec<ArgKind, Global>,
found_args: Vec<ArgKind, Global>,
is_closure: bool
) -> DiagnosticBuilder<'tcx>;
}Required methods
fn report_fulfillment_errors(
&self,
errors: &[FulfillmentError<'tcx>],
body_id: Option<BodyId>,
fallback_has_occurred: bool
)
fn report_overflow_error<T>(
&self,
obligation: &Obligation<'tcx, T>,
suggest_increasing_limit: bool
) -> ! where
T: Display + TypeFoldable<'tcx>,
fn report_overflow_error_cycle(
&self,
cycle: &[Obligation<'tcx, Predicate<'tcx>>]
) -> !
fn report_selection_error(
&self,
obligation: Obligation<'tcx, Predicate<'tcx>>,
root_obligation: &Obligation<'tcx, Predicate<'tcx>>,
error: &SelectionError<'tcx>,
fallback_has_occurred: bool
)
fn report_selection_error(
&self,
obligation: Obligation<'tcx, Predicate<'tcx>>,
root_obligation: &Obligation<'tcx, Predicate<'tcx>>,
error: &SelectionError<'tcx>,
fallback_has_occurred: bool
)
The root_obligation parameter should be the root_obligation field
from a FulfillmentError. If no FulfillmentError is available,
then it should be the same as obligation.
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.
Reports an error when the number of arguments needed by a trait match doesn’t match the number that the expression provides.