1
Fork 0

rebase and review comments

This commit is contained in:
Esteban Küber 2023-02-01 17:38:56 +00:00
parent 287cd5974c
commit 5d63e10318
24 changed files with 56 additions and 57 deletions

View file

@ -612,7 +612,7 @@ impl Diagnostic {
pub fn multipart_suggestion_with_style(
&mut self,
msg: impl Into<SubdiagnosticMessage>,
mut suggestion: Vec<(Span, String)>,
suggestion: Vec<(Span, String)>,
applicability: Applicability,
style: SuggestionStyle,
) -> &mut Self {
@ -634,7 +634,6 @@ impl Diagnostic {
None,
"suggestion must not have overlapping parts",
);
suggestion.sort_by_key(|(span, _)| (span.lo(), span.hi()));
self.push_suggestion(CodeSuggestion {
substitutions: vec![Substitution { parts }],

View file

@ -930,7 +930,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
"".to_string()
};
labels
.push((provided_span, format!("argument{} unexpected", provided_ty_name)));
.push((provided_span, format!("unexpected argument{}", provided_ty_name)));
let mut span = provided_span;
if arg_idx.index() > 0
&& let Some((_, prev)) = provided_arg_tys