add FIXME and use 'span_label'
This commit is contained in:
parent
4cb86c9089
commit
5abc5e9b3d
1 changed files with 4 additions and 4 deletions
|
|
@ -519,11 +519,11 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
|||
}
|
||||
|
||||
if item_name.as_str() == "as_str" && actual.peel_refs().is_str() {
|
||||
err.span_suggestion(
|
||||
// FIXME: the span is not quite correct, it should point to ".as_str()" instead
|
||||
// of just "as_str".
|
||||
err.span_label(
|
||||
span,
|
||||
"try removing `as_str`",
|
||||
String::new(),
|
||||
Applicability::MaybeIncorrect,
|
||||
"try removing `as_str`"
|
||||
);
|
||||
} else if let Some(lev_candidate) = lev_candidate {
|
||||
let def_kind = lev_candidate.def_kind();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue