address comments
This commit is contained in:
parent
d9d69212c3
commit
7d3a6f1655
7 changed files with 13 additions and 14 deletions
|
@ -659,11 +659,12 @@ fn infer_placeholder_type(
|
|||
format!("{}: {}", item_ident, ty),
|
||||
Applicability::MachineApplicable,
|
||||
)
|
||||
.emit_unless(matches!(ty.kind(), ty::Error(_)));
|
||||
.emit_unless(ty.references_error());
|
||||
}
|
||||
None => {
|
||||
let mut diag = bad_placeholder_type(tcx, vec![span]);
|
||||
if !matches!(ty.kind(), ty::Error(_)) {
|
||||
|
||||
if !ty.references_error() {
|
||||
diag.span_suggestion(
|
||||
span,
|
||||
"replace `_` with the correct type",
|
||||
|
@ -671,6 +672,7 @@ fn infer_placeholder_type(
|
|||
Applicability::MaybeIncorrect,
|
||||
);
|
||||
}
|
||||
|
||||
diag.emit();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue