Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 5 pull requests #106529

Merged
merged 22 commits into from
Jan 6, 2023
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b83fa06
Add regression test for #58355
JohnTitor Jan 5, 2023
ea43eb3
Point at expressions where inference refines an unexpected type
estebank Jan 3, 2023
05c30b0
Skip macros to avoid talking about bindings the user can't see
estebank Jan 3, 2023
48094a4
More eagerly resolve expr `ty`s before writing them
estebank Jan 3, 2023
6b0cce4
review comments: do not always point at init expr
estebank Jan 3, 2023
9cc8d86
Tweak output
estebank Jan 4, 2023
4ac7d1c
Formatting
estebank Jan 4, 2023
ad82eed
Use `BottomUpFolder`
estebank Jan 4, 2023
c905f5e
Account for type error on method arg caused by earlier inference
estebank Jan 5, 2023
f571862
Suggest changing argument on type error
estebank Jan 5, 2023
98f3936
review comment: potentially produce more suggestions for arg type mis…
estebank Jan 5, 2023
b182259
review comments: reword
estebank Jan 5, 2023
f98f2fc
fix rebase
estebank Jan 5, 2023
0de182a
rustdoc: remove legacy user-select CSS
notriddle Jan 5, 2023
f2ad85a
Fix error-index redirect to work with back button.
ehuss Jan 5, 2023
72c3082
error-index: Don't generate 404 instead of removing it.
ehuss Jan 5, 2023
10dbcf0
fix [type error] for error E0029 and E0277
Jan 5, 2023
6ae0f08
Rollup merge of #106400 - estebank:type-errs, r=compiler-errors
Dylan-DPC Jan 6, 2023
2b6e38c
Rollup merge of #106491 - ehuss:error-index-redirect, r=GuillaumeGome…
Dylan-DPC Jan 6, 2023
4b094c5
Rollup merge of #106494 - JohnTitor:issue-58355, r=compiler-errors
Dylan-DPC Jan 6, 2023
a8f7ec2
Rollup merge of #106499 - lyming2007:issue-105946-fix, r=estebank
Dylan-DPC Jan 6, 2023
dd97619
Rollup merge of #106502 - notriddle:notriddle/user-select, r=Guillaum…
Dylan-DPC Jan 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
review comment: potentially produce more suggestions for arg type mis…
…match
estebank committed Jan 5, 2023
commit 98f3936aa7e99f54ff377a77f9b03cea2c2c29d4
4 changes: 2 additions & 2 deletions compiler/rustc_hir_typeck/src/demand.rs
Original file line number Diff line number Diff line change
@@ -364,11 +364,11 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
param_expected.insert(error.expected, error.found);
}
}
for (param, (arg,arg_ty)) in param_args.iter() {
for (param, (arg, arg_ty)) in param_args.iter() {
let Some(expected) = param_expected.get(param) else { continue; };
let Some(found) = param_found.get(param) else { continue; };
if self.can_eq(self.param_env, *arg_ty, *found).is_err() { continue; }
self.suggest_deref_ref_or_into(err, arg, *expected, *found, None);
self.emit_coerce_suggestions(err, arg, *found, *expected, None, None);
}

let ty = eraser.fold_ty(ty);