Use multispan suggestions more often
* Use more accurate span for `async move` suggestion * Use more accurate span for deref suggestion * Use `multipart_suggestion` more often
This commit is contained in:
@@ -301,6 +301,20 @@ impl<'a> DiagnosticBuilder<'a> {
|
||||
self
|
||||
}
|
||||
|
||||
/// See [`Diagnostic::multipart_suggestions()`].
|
||||
pub fn multipart_suggestions(
|
||||
&mut self,
|
||||
msg: &str,
|
||||
suggestions: impl Iterator<Item = Vec<(Span, String)>>,
|
||||
applicability: Applicability,
|
||||
) -> &mut Self {
|
||||
if !self.0.allow_suggestions {
|
||||
return self;
|
||||
}
|
||||
self.0.diagnostic.multipart_suggestions(msg, suggestions, applicability);
|
||||
self
|
||||
}
|
||||
|
||||
/// See [`Diagnostic::span_suggestion_short()`].
|
||||
pub fn span_suggestion_short(
|
||||
&mut self,
|
||||
|
||||
Reference in New Issue
Block a user