Make span_suggestions take IntoIterator
This commit is contained in:
parent
fbce7decd8
commit
e807cb3c41
6 changed files with 11 additions and 11 deletions
|
@ -717,7 +717,7 @@ impl Diagnostic {
|
|||
&mut self,
|
||||
sp: Span,
|
||||
msg: impl Into<SubdiagnosticMessage>,
|
||||
suggestions: impl Iterator<Item = String>,
|
||||
suggestions: impl IntoIterator<Item = String>,
|
||||
applicability: Applicability,
|
||||
) -> &mut Self {
|
||||
self.span_suggestions_with_style(
|
||||
|
@ -738,7 +738,7 @@ impl Diagnostic {
|
|||
applicability: Applicability,
|
||||
style: SuggestionStyle,
|
||||
) -> &mut Self {
|
||||
let mut suggestions: Vec<_> = suggestions.collect();
|
||||
let mut suggestions: Vec<_> = suggestions.into_iter().collect();
|
||||
suggestions.sort();
|
||||
|
||||
debug_assert!(
|
||||
|
@ -765,7 +765,7 @@ impl Diagnostic {
|
|||
pub fn multipart_suggestions(
|
||||
&mut self,
|
||||
msg: impl Into<SubdiagnosticMessage>,
|
||||
suggestions: impl Iterator<Item = Vec<(Span, String)>>,
|
||||
suggestions: impl IntoIterator<Item = Vec<(Span, String)>>,
|
||||
applicability: Applicability,
|
||||
) -> &mut Self {
|
||||
let suggestions: Vec<_> = suggestions.collect();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue