1
Fork 0

Do not suggest adjusting trait signature on type mismatch

This commit is contained in:
Michael Goulet 2023-06-10 22:51:00 +00:00
parent 0f7ef1a202
commit d1ab6c2ae3
2 changed files with 4 additions and 5 deletions

View file

@ -3959,6 +3959,10 @@ fn hint_missing_borrow<'tcx>(
found_node: Node<'_>,
err: &mut Diagnostic,
) {
if matches!(found_node, Node::TraitItem(..)) {
return;
}
let found_args = match found.kind() {
ty::FnPtr(f) => infcx.instantiate_binder_with_placeholders(*f).inputs().iter(),
kind => {