diff options
| author | Jacob Pratt <jacob@jhpratt.dev> | 2024-11-17 22:30:49 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-17 22:30:49 -0500 |
| commit | fc4f71db68f41311784273e499fe3ce0212b40f9 (patch) | |
| tree | 3a2a4725587732f02962bcb63e4345e711b9c12f /compiler/rustc_pattern_analysis/src/errors.rs | |
| parent | c68fef9fc90c78b1bed6301d06102e01bd6a68a4 (diff) | |
| parent | 546ba3d310ae2d795b43188ce1b9980b33e690e5 (diff) | |
| download | rust-fc4f71db68f41311784273e499fe3ce0212b40f9.tar.gz rust-fc4f71db68f41311784273e499fe3ce0212b40f9.zip | |
Rollup merge of #133130 - dianne:fix-133118, r=compiler-errors
`suggest_borrow_generic_arg`: instantiate clauses properly This simplifies and fixes the way `suggest_borrow_generic_arg` instantiates callees' predicates when testing them to see if a moved argument can instead be borrowed. Previously, it would ICE if the moved argument's type included a region variable, since it was getting passed to a call of `EarlyBinder::instantiate`. This makes the instantiation much more straightforward, which also fixes the ICE. Fixes #133118 This also modifies `tests/ui/moves/moved-value-on-as-ref-arg.rs` to have more useful bounds on the tests for suggestions to borrow `Borrow` and `BorrowMut` arguments. With its old tautological `T: BorrowMut<T>` bound, this fix would make it suggest a shared borrow for that argument.
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
