File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
compiler/rustc_infer/src/errors Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -108,11 +108,6 @@ impl<'a> DescriptionCtx<'a> {
108108 }
109109 Some ( me)
110110 }
111-
112- fn add_to ( self , diag : & mut rustc_errors:: Diagnostic ) {
113- diag. set_arg ( "desc_kind" , self . kind ) ;
114- diag. set_arg ( "desc_arg" , self . arg ) ;
115- }
116111}
117112
118113pub enum PrefixKind {
@@ -196,10 +191,11 @@ impl AddToDiagnostic for RegionExplanation<'_> {
196191 {
197192 diag. set_arg ( "pref_kind" , self . prefix ) ;
198193 diag. set_arg ( "suff_kind" , self . suffix ) ;
199- let desc_span = self . desc . span ;
200- self . desc . add_to ( diag) ;
194+ diag. set_arg ( "desc_kind" , self . desc . kind ) ;
195+ diag. set_arg ( "desc_arg" , self . desc . arg ) ;
196+
201197 let msg = f ( diag, fluent:: infer_region_explanation. into ( ) ) ;
202- if let Some ( span) = desc_span {
198+ if let Some ( span) = self . desc . span {
203199 diag. span_note ( span, msg) ;
204200 } else {
205201 diag. note ( msg) ;
You can’t perform that action at this time.
0 commit comments