File tree 1 file changed +4
-8
lines changed
compiler/rustc_infer/src/errors
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> {
108
108
}
109
109
Some ( me)
110
110
}
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
- }
116
111
}
117
112
118
113
pub enum PrefixKind {
@@ -196,10 +191,11 @@ impl AddToDiagnostic for RegionExplanation<'_> {
196
191
{
197
192
diag. set_arg ( "pref_kind" , self . prefix ) ;
198
193
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
+
201
197
let msg = f ( diag, fluent:: infer_region_explanation. into ( ) ) ;
202
- if let Some ( span) = desc_span {
198
+ if let Some ( span) = self . desc . span {
203
199
diag. span_note ( span, msg) ;
204
200
} else {
205
201
diag. note ( msg) ;
You can’t perform that action at this time.
0 commit comments