X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_infer%2Fsrc%2Finfer%2Ferror_reporting%2Fmod.rs;h=0223979263d85cb7189858a2243cd5407ecb35e9;hb=c8334ce60cce9571fcfdea31a3e67e3933fb7665;hp=5c3e9a2d5cccd904de3a8d9756f5fb9ef7ba82c8;hpb=70f1566b2bbdf92dffb40fa122986a58b2c4ee86;p=rust.git diff --git a/compiler/rustc_infer/src/infer/error_reporting/mod.rs b/compiler/rustc_infer/src/infer/error_reporting/mod.rs index 5c3e9a2d5cc..0223979263d 100644 --- a/compiler/rustc_infer/src/infer/error_reporting/mod.rs +++ b/compiler/rustc_infer/src/infer/error_reporting/mod.rs @@ -55,6 +55,7 @@ use crate::traits::error_reporting::report_object_safety_error; use crate::traits::{ IfExpressionCause, MatchExpressionArmCause, ObligationCause, ObligationCauseCode, + PredicateObligation, }; use rustc_data_structures::fx::{FxIndexMap, FxIndexSet}; @@ -91,8 +92,12 @@ pub struct TypeErrCtxt<'a, 'tcx> { pub infcx: &'a InferCtxt<'tcx>, pub typeck_results: Option>>, - pub normalize_fn_sig: Box) -> ty::PolyFnSig<'tcx> + 'a>, pub fallback_has_occurred: bool, + + pub normalize_fn_sig: Box) -> ty::PolyFnSig<'tcx> + 'a>, + + pub autoderef_steps: + Box) -> Vec<(Ty<'tcx>, Vec>)> + 'a>, } impl TypeErrCtxt<'_, '_> { @@ -310,7 +315,7 @@ pub fn unexpected_hidden_region_diagnostic<'tcx>( // Ugh. This is a painful case: the hidden region is not one // that we can easily summarize or explain. This can happen // in a case like - // `src/test/ui/multiple-lifetimes/ordinary-bounds-unsuited.rs`: + // `tests/ui/multiple-lifetimes/ordinary-bounds-unsuited.rs`: // // ``` // fn upper_bounds<'a, 'b>(a: Ordinary<'a>, b: Ordinary<'b>) -> impl Trait<'a, 'b> { @@ -1395,7 +1400,7 @@ fn lifetime_display(lifetime: Region<'_>) -> String { /// `swap_secondary_and_primary` is used to make projection errors in particular nicer by using /// the message in `secondary_span` as the primary label, and apply the message that would /// otherwise be used for the primary label on the `secondary_span` `Span`. This applies on - /// E0271, like `src/test/ui/issues/issue-39970.stderr`. + /// E0271, like `tests/ui/issues/issue-39970.stderr`. #[instrument( level = "debug", skip(self, diag, secondary_span, swap_secondary_and_primary, prefer_label)