diff options
| author | bors <bors@rust-lang.org> | 2022-11-10 13:04:51 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-11-10 13:04:51 +0000 |
| commit | 01a6f30324deb8f9c9ec4a70c53690c5d073a244 (patch) | |
| tree | 8766879d89fb49dd661fc3fb41847f330f75e908 /compiler/rustc_errors/src | |
| parent | 11fa0850f03ae49fe1053a21bcdcf8a301668ad8 (diff) | |
| parent | 609bea9c50cf4c98dbcfdd647129a0f8cae3b9a1 (diff) | |
| download | rust-01a6f30324deb8f9c9ec4a70c53690c5d073a244.tar.gz rust-01a6f30324deb8f9c9ec4a70c53690c5d073a244.zip | |
Auto merge of #104236 - compiler-errors:rollup-adjshd6, r=compiler-errors
Rollup of 9 pull requests Successful merges: - #102763 (Some diagnostic-related nits) - #103443 (Parser: Recover from using colon as path separator in imports) - #103675 (remove redundent "<>" for ty::Slice with reference type) - #104046 (bootstrap: add support for running Miri on a file) - #104115 (Migrate crate-search element to CSS variables) - #104190 (Ignore "Change InferCtxtBuilder from enter to build" in git blame) - #104201 (Add check in GUI test for file loading failure) - #104211 (:arrow_up: rust-analyzer) - #104231 (Update mailmap) Failed merges: - #104169 (Migrate `:target` rules to use CSS variables) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_errors/src')
| -rw-r--r-- | compiler/rustc_errors/src/diagnostic.rs | 10 | ||||
| -rw-r--r-- | compiler/rustc_errors/src/diagnostic_builder.rs | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/compiler/rustc_errors/src/diagnostic.rs b/compiler/rustc_errors/src/diagnostic.rs index 43101bbb9d3..375e3ebd77d 100644 --- a/compiler/rustc_errors/src/diagnostic.rs +++ b/compiler/rustc_errors/src/diagnostic.rs @@ -742,7 +742,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( @@ -759,11 +759,11 @@ impl Diagnostic { &mut self, sp: Span, msg: impl Into<SubdiagnosticMessage>, - suggestions: impl Iterator<Item = String>, + suggestions: impl IntoIterator<Item = String>, applicability: Applicability, style: SuggestionStyle, ) -> &mut Self { - let mut suggestions: Vec<_> = suggestions.collect(); + let mut suggestions: Vec<_> = suggestions.into_iter().collect(); suggestions.sort(); debug_assert!( @@ -790,10 +790,10 @@ 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(); + let suggestions: Vec<_> = suggestions.into_iter().collect(); debug_assert!( !(suggestions .iter() diff --git a/compiler/rustc_errors/src/diagnostic_builder.rs b/compiler/rustc_errors/src/diagnostic_builder.rs index 730061fca99..18cbf963494 100644 --- a/compiler/rustc_errors/src/diagnostic_builder.rs +++ b/compiler/rustc_errors/src/diagnostic_builder.rs @@ -599,13 +599,13 @@ impl<'a, G: EmissionGuarantee> DiagnosticBuilder<'a, G> { &mut self, sp: Span, msg: impl Into<SubdiagnosticMessage>, - suggestions: impl Iterator<Item = String>, + suggestions: impl IntoIterator<Item = String>, applicability: Applicability, ) -> &mut Self); forward!(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); forward!(pub fn span_suggestion_short( |
