Fix diagnostic suggests adding type [type error]
Fixes #79040 Unresolved questions: Why does this change output the diagnostic twice? Why does the CI fail when the errors are pointed out (UI tests)?
This commit is contained in:
parent
1279b3b923
commit
d9d69212c3
5 changed files with 27 additions and 21 deletions
|
@ -659,7 +659,7 @@ fn infer_placeholder_type(
|
|||
format!("{}: {}", item_ident, ty),
|
||||
Applicability::MachineApplicable,
|
||||
)
|
||||
.emit();
|
||||
.emit_unless(matches!(ty.kind(), ty::Error(_)));
|
||||
}
|
||||
None => {
|
||||
let mut diag = bad_placeholder_type(tcx, vec![span]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue