{
let mut eraser = TypeParamEraser(self.tcx);
let candidate_len = impl_candidates.len();
- let suggestions = impl_candidates.iter().map(|candidate| {
+ let mut suggestions: Vec<_> = impl_candidates.iter().map(|candidate| {
let candidate = candidate.super_fold_with(&mut eraser);
vec![
(expr.span.shrink_to_lo(), format!("{}::{}(", candidate, segment.ident)),
(expr.span.shrink_to_hi().with_hi(exprs[1].span.lo()), ", ".to_string())
},
]
- });
+ }).collect();
+ suggestions.sort_by(|a, b| a[0].1.cmp(&b[0].1));
err.multipart_suggestions(
&format!(
"use the fully qualified path for the potential candidate{}",
pluralize!(candidate_len),
),
- suggestions,
+ suggestions.into_iter(),
Applicability::MaybeIncorrect,
);
}
- impl AsRef<str> for String;
help: use the fully qualified path for the potential candidates
|
-LL | opts.get(<str as AsRef<Path>>::as_ref(opt));
- | +++++++++++++++++++++++++++++ ~
-LL | opts.get(<str as AsRef<OsStr>>::as_ref(opt));
- | ++++++++++++++++++++++++++++++ ~
-LL | opts.get(<str as AsRef<str>>::as_ref(opt));
- | ++++++++++++++++++++++++++++ ~
-LL | opts.get(<str as AsRef<[u8]>>::as_ref(opt));
- | +++++++++++++++++++++++++++++ ~
+LL | opts.get(<String as AsRef<OsStr>>::as_ref(opt));
+ | +++++++++++++++++++++++++++++++++ ~
+LL | opts.get(<String as AsRef<Path>>::as_ref(opt));
+ | ++++++++++++++++++++++++++++++++ ~
+LL | opts.get(<String as AsRef<[u8]>>::as_ref(opt));
+ | ++++++++++++++++++++++++++++++++ ~
+LL | opts.get(<String as AsRef<str>>::as_ref(opt));
+ | +++++++++++++++++++++++++++++++ ~
and 4 other candidates
error[E0283]: type annotations needed