@@ -31,7 +31,7 @@ use rustc_hir::def_id::{DefId, LocalDefId};
31
31
use rustc_hir:: intravisit:: { self , InferKind , Visitor , VisitorExt , walk_generics} ;
32
32
use rustc_hir:: { self as hir, GenericParamKind , HirId , Node , PreciseCapturingArgKind } ;
33
33
use rustc_infer:: infer:: { InferCtxt , TyCtxtInferExt } ;
34
- use rustc_infer:: traits:: ObligationCause ;
34
+ use rustc_infer:: traits:: { DynCompatibilityViolation , ObligationCause } ;
35
35
use rustc_middle:: hir:: nested_filter;
36
36
use rustc_middle:: query:: Providers ;
37
37
use rustc_middle:: ty:: util:: { Discr , IntTypeExt } ;
@@ -40,7 +40,7 @@ use rustc_middle::{bug, span_bug};
40
40
use rustc_span:: { DUMMY_SP , Ident , Span , Symbol , kw, sym} ;
41
41
use rustc_trait_selection:: error_reporting:: traits:: suggestions:: NextTypeParamName ;
42
42
use rustc_trait_selection:: infer:: InferCtxtExt ;
43
- use rustc_trait_selection:: traits:: ObligationCtxt ;
43
+ use rustc_trait_selection:: traits:: { ObligationCtxt , hir_ty_lowering_dyn_compatibility_violations } ;
44
44
use tracing:: { debug, instrument} ;
45
45
46
46
use crate :: errors;
@@ -625,6 +625,10 @@ impl<'tcx> HirTyLowerer<'tcx> for ItemCtxt<'tcx> {
625
625
626
626
( input_tys, output_ty)
627
627
}
628
+
629
+ fn dyn_compatibility_violations ( & self , trait_def_id : DefId ) -> Vec < DynCompatibilityViolation > {
630
+ hir_ty_lowering_dyn_compatibility_violations ( self . tcx , trait_def_id)
631
+ }
628
632
}
629
633
630
634
/// Synthesize a new lifetime name that doesn't clash with any of the lifetimes already present.
0 commit comments