File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -2323,18 +2323,20 @@ impl<'a> Resolver<'a> {
2323
2323
let self_is_available = this. self_value_is_available ( path[ 0 ] . ctxt , span) ;
2324
2324
match candidate {
2325
2325
AssocSuggestion :: Field => {
2326
- err. span_label ( span, format ! ( "did you mean `self.{}`?" , path_str) ) ;
2326
+ err. span_suggestion ( span, "did you mean" ,
2327
+ format ! ( "self.{}" , path_str) ) ;
2327
2328
if !self_is_available {
2328
2329
err. span_label ( span, format ! ( "`self` value is only available in \
2329
2330
methods with `self` parameter") ) ;
2330
2331
}
2331
2332
}
2332
2333
AssocSuggestion :: MethodWithSelf if self_is_available => {
2333
- err. span_label ( span, format ! ( "did you mean `self.{}(...)`? " ,
2334
- path_str) ) ;
2334
+ err. span_suggestion ( span, "did you mean" ,
2335
+ format ! ( "self.{}" , path_str) ) ;
2335
2336
}
2336
2337
AssocSuggestion :: MethodWithSelf | AssocSuggestion :: AssocItem => {
2337
- err. span_label ( span, format ! ( "did you mean `Self::{}`?" , path_str) ) ;
2338
+ err. span_suggestion ( span, "did you mean" ,
2339
+ format ! ( "Self::{}" , path_str) ) ;
2338
2340
}
2339
2341
}
2340
2342
return err;
You can’t perform that action at this time.
0 commit comments